Per-field selection of asset sources (options.sources on file and image
fields; video fields always use the built-in Media Library source). When
set, it replaces the asset sources configured on the Studio for this field:
AssetSource entries are used as-is (the classic pattern of importing a
source from a plugin).
string entries name a configured source by its AssetSource.name
(e.g. 'sanity-default', 'sanity-media-library'); names that match no
configured source are dropped with a console warning.
A predicate function filters the configured list. Useful when the full
name is not statically known — federated asset source names are
{applicationId}:{viewName} with a runtime application id, so e.g.
(source) => source.name.endsWith(':dropbox').
An empty array (or a predicate that rejects every source) disables
browsing for the field while uploads keep working.
Per-field selection of asset sources (
options.sourceson file and image fields; video fields always use the built-in Media Library source). When set, it replaces the asset sources configured on the Studio for this field:AssetSourceentries are used as-is (the classic pattern of importing a source from a plugin).stringentries name a configured source by itsAssetSource.name(e.g.'sanity-default','sanity-media-library'); names that match no configured source are dropped with a console warning.{applicationId}:{viewName}with a runtime application id, so e.g.(source) => source.name.endsWith(':dropbox').An empty array (or a predicate that rejects every source) disables browsing for the field while uploads keep working.