How to Set a Hotspot Crop for an Image Hosted in Sanity
{
name: 'image',
title: 'Image',
type: 'image',
options: {
hotspot: true
},
fields: [
{name: 'title', title: 'Title', type: 'string'},
{name: 'alt', title: 'Alt Description', type: 'string'},
{name: 'attribution', title: 'Attribution', type: 'string'}
]
}sanity deployto get them to show up.
It is the responsibility of the front-end to respect the crop/hot-spot according to the wishes of the editor, but conveniently we provide a JavaScript library that takes care of this for you.
Was this answer helpful?
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.