How to organize assets for editors in Sanity?

4 replies
Last updated: Jul 8, 2020
Hey everyone! Really curious if there’s any way to enable editors organize assets. I can see the the potential for large asset libraries to become difficult to navigate and use.
AI Update

Great question! Sanity has several approaches to help editors organize assets depending on your setup and needs:

Media Library (Enterprise)

If you're on an Enterprise plan, Media Library is Sanity's dedicated solution for large-scale asset organization. It's an organization-wide asset management system that treats assets like structured content rather than just blob storage.

Key organizational features include:

Aspects - These are custom metadata fields you can attach to assets, essentially giving your media files schema-like structure. You can create aspects for things like:

  • Copyright information
  • Brand guidelines compliance flags
  • Campaign associations
  • Global document references linking to other content

Collections - Group assets into organized collections that can be browsed through the library menu

Asset Versioning - Maintain multiple versions of the same asset (like retouched photos or updated files) while tracking which version is used where

Advanced Filtering & Querying - Since aspects are queryable with GROQ, you can build sophisticated searches and filters to find exactly what you need

Standard Sanity Studio

If you're not using Media Library, you can still improve asset organization:

Custom Fields on Images - Add fields to your image type schema for organization:

{
  name: 'image',
  type: 'image',
  fields: [
    {name: 'category', type: 'string'},
    {name: 'tags', type: 'array', of: [{type: 'string'}]},
    {name: 'alt', type: 'string'},
    {name: 'description', type: 'text'}
  ]
}

Asset Sources - Integrate with external DAM systems like Cloudinary using asset sources if you already have an established asset management workflow elsewhere

Metadata - Enable automatic metadata extraction including EXIF data, location, and color palettes which can be used for filtering

For large asset libraries, Media Library is definitely the most robust solution, but the standard approach with custom fields can work well for smaller to medium-sized projects!

Show original thread
4 replies
Hi Connor, you might want to check out the media browser plugin: https://www.sanity.io/plugins/sanity-plugin-media
Alternatively, you could set up your own views of the assets inside your
deskStructure.js
file:
sanity.imageAsset
is a type you can use like any other document type you’ve defined 🙂
Hi Connor, you might want to check out the media browser plugin: https://www.sanity.io/plugins/sanity-plugin-media
Alternatively, you could set up your own views of the assets inside your
deskStructure.js
file:
sanity.imageAsset
is a type you can use like any other document type you’ve defined 🙂
Exactly what I was looking for - Would love to see this mentioned in the docs! Thanks Peter!
Noted - I agree we should add this, thanks!

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?