Shopify + Sanity: Read about the investment and partnership –> Asset Source

v3 Ready

By Rein Undheim

Allows you to use the api from the studio to remove the background from your images



This is the Sanity Studio v3 version of sanity-plugin-asset-source-remove-bg.

What is it?

Plugin for Sanity Studio providing asset source for removing the background of existing images with the API. Caution: The service offers 50 free preview images each month, which are of a lower quality, but you are able to purchase credits at their website. (I am not affiliated by any means with


  • Remove the background of images.
  • Select the type and format of the images.
  • See remaining free previews and credits left in your account.
  • Select which Sanity user roles are allowed to use the API.

What might be added

  • Set a custom background color or picture.

  • Batch conversion

  • Uploading an image directly to the plugin for bg removal without storing it in the sanity library

  • ??? any suggestions?

    Remove BG Asset Source


npm install --save sanity-plugin-asset-source-remove-bg


yarn add sanity-plugin-asset-source-remove-bg



  • apiKey: String | Can be created here:

  • allowedUserRoles?: String[]

    Add it as a plugin in sanity.config.ts (or .js):

 import {createConfig} from 'sanity'
 import {removeBgAssetSourcePlugin} from 'sanity-plugin-remove-bg-converter'

 export const createConfig({
     plugins: [
             apiKey: "my-api-key",
             allowedUserRoles: ["administrator", "editor"]

Develop & test

Make sure to run npm run build once, then run

npm run link-watch

In another shell, cd to your test studio and run:

npx yalc add sanity-plugin-asset-source-giphy --link && yarn install

Now, changes in this repo will be automatically built and pushed to the studio, triggering hotreload. Yalc avoids issues with react-hooks that are typical when using yarn/npm link.

About build & watch

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


MIT © Rein Undheim See LICENSE

Studio Version

This plugin is available for Studio v3.What are studio versions and which do I choose?