How AI is powering better personalization in e-commerce [with Vercel]. Sign up now

Image Asset Picker

User can browse and bulk-select image assets to add to an image array field.

By Simon Gowing

Install command

npm i sanity-plugin-image-asset-picker

This is a Sanity Studio v5 plugin.

Sanity Image Asset Picker

A Sanity Studio plugin that enables users to browse and bulk-select image assets to add to an image array field.

Installation

npm install sanity-plugin-image-asset-picker

Usage

As a Sanity Plugin

Add the plugin to your Sanity configuration:

// sanity.config.js or sanity.config.ts
import {defineConfig} from 'sanity';
import {imageAssetPickerPlugin} from 'sanity-plugin-image-asset-picker';

export default defineConfig({
  // ...
  plugins: [imageAssetPickerPlugin()],
});

The plugin will register the ImageAssetPicker component to be used with array fields of type image. You do not need to use the component directly in schema definitions.

Features

  • Browse all image assets in your Sanity dataset
  • Search for specific images by filename
  • Select multiple images to add to an array field
  • Pagination for browsing large image collections

Requirements

  • Sanity v5.x
  • React 19.2+

Develop & test

This plugin uses @sanity/plugin-kit with default configuration for build & watch scripts.

See Testing a plugin in Sanity Studio on how to run this plugin with hotreload in the studio.

Release new version

Run "CI & Release" workflow. Make sure to select the main branch and check "Release new version".

Semantic release will only release on configured branches, so it is safe to run release on any branch.

License

MIT © Simon Gowing