I can't find the edit button to edit the image... can someone help?

5 replies
Last updated: Dec 31, 2020
I can't find the edit button to edit the image... can someone help?
AI Update

It sounds like you're trying to edit an image in Sanity Studio but can't find the edit button! Here's what you need to know:

The edit button (pencil icon) only appears if hotspot and crop functionality is enabled in your schema. Look for a pencil icon in the top right corner of the image component after you've uploaded or selected an image.

If you don't see the pencil icon, your schema likely doesn't have hotspot enabled. To fix this, you need to update your image field schema to include:

{
  name: 'image',
  title: 'Image',
  type: 'image',
  options: {
    hotspot: true  // This enables the edit button!
  }
}

Once hotspot is enabled in your schema, you'll be able to click the pencil icon to access the image editor where you can set focal points and crop areas.

Important: If you update the schema, you may need to restart your Studio development server for the changes to take effect.

If you're working on a project where you don't have access to modify the schema, you'll need to reach out to whoever manages the Studio configuration to enable this feature for you.

What do you mean by edit the image?
Normally there's an edit button where I can zoom in on picture and stuff
The schema for this doc type might not be configured for that?
Do you have other docs of the same type that have the edit button?
I believe passing
hotspot: true
as an option for the image field enables the edit
Yup! Add
options.hotspot
to the field config https://www.sanity.io/docs/image-type

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.

Was this answer helpful?