Need search functionality for file lists in Sanity
Good news! There are actually a couple of solutions for searching through files in Sanity Studio:
1. Media Library Plugin (Community)
The most popular solution is the sanity-plugin-media community plugin. This gives you a full-featured media browser with granular search tools that let you:
- Search and filter by tag names
- Filter by asset usage (where files are being used)
- Filter by file size
- Sort and organize your assets
- Batch operations for managing multiple files
This plugin works as an alternative to the default asset picker and gives you a much more powerful interface for managing large collections of files and images.
2. Media Library (Enterprise Feature)
If you're on an Enterprise plan, Sanity offers an official Media Library as an add-on. This is an organization-scoped DAM (Digital Asset Management) system that provides:
- Centralized asset management across projects
- Metadata and versioning
- GROQ queries for filtering assets - you can filter results directly in Studio using GROQ syntax
- Global Document References for reusing assets
- Collections for grouping assets
- Search and filter capabilities built into the interface
The Enterprise Media Library is more powerful and designed for teams that need to manage assets at scale across multiple projects.
3. Custom Asset Source
If you need something specific, you could also build a custom asset source that provides your own search interface, but the community plugin is probably the quickest solution for most use cases.
For most users dealing with "tens of files," I'd recommend starting with the sanity-plugin-media community plugin - it's free, well-maintained, and should solve your search and organization needs right away. If your organization grows to need enterprise-level asset management across multiple projects, then the official Media Library becomes worth considering.
Show original thread2 replies
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.