Sanity
Pick, search, and upload Raster assets from Sanity Studio.
The Raster plugin for Sanity Studio brings your Raster libraries into the Studio. Editors browse, search, and upload assets, and pick them into any image field.
Install and configure
The plugin needs Sanity Studio 4.2 or later, React 19, and Node.js 22.12 or later.
npm install @raster-app/sanity-plugin-rasterAdd the plugin to your Studio config, with your organization's slug, like
acme in https://raster.app/acme:
import { defineConfig } from 'sanity'
import { rasterPlugin } from '@raster-app/sanity-plugin-raster'
export default defineConfig({
// ...other config
plugins: [rasterPlugin({ orgId: 'acme' })],
})Sign in
Open Raster Assets in the Studio's top bar and connect in one of two ways:
- Each editor signs in. Select Sign in with Raster, open the consent page, and approve the code shown.
- An administrator connects everyone. Create an organization API key, paste it under Connect everyone with an API key, and select Save for everyone.
What you can do
Pick an image into a field
Raster appears on every image field, with no schema changes.
- On an image field, open Select and choose Raster.
- Open an asset, or one of its versions, and select Pick asset.
The image lands in the field like any other Sanity image, with hotspot and crop, and links back to its Raster asset.
Browse, search, and upload
Open Raster Assets in the Studio's top bar to work in the full pane. The same picker opens from an image field.
- Switch organizations from the menu at the top of the sidebar.
- Open a library from the sidebar to see its assets.
- Search every library, or the open one, from the search field.
- Upload into the open library with Upload in the sidebar, or drop a file onto its assets.
- Open an asset to see it large, with its dimensions, file size, and creation date.
- Open in Raster or Copy URL from the open asset.
- See versions. An open asset lists its versions. Select Set as default on one to make it the asset's default.
- Upload a variant to the open asset with Upload variant, or drop a file onto its versions.
- Sign out from the bottom of the sidebar.
The picker follows the Studio's light or dark scheme.
Upgrade from 1.x
- Remove
apiKeyfromrasterPlugin(...). - Sign in from the Raster Assets tool.
To build your own integration, use the Raster SDK.