How to Render an Image From an Array For a Document?

3 replies
Last updated: Mar 16, 2022
Is there a way to render an image from an array you are using as the media preview for that document? If I could for example get the first image (blue square) to be the preview?
Mar 16, 2022, 1:54 PM
Think
media: imagesVariant.0.image
should work
Mar 16, 2022, 1:58 PM
Ah, se der ja. Tusen takk, Tarje!
Mar 16, 2022, 2:06 PM
Bare hyggelig! :-)
Mar 16, 2022, 2:22 PM

Sanity– build remarkable experiences at scale

The Sanity Composable Content Cloud is the headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?

Categorized in