Get a peek at our latest innovations at Sanity Product Day on Dec 8th →

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


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 Get the most out of your content is a platform to build websites and applications. It comes with great APIs that let you treat content like data. Free to get started, and pay-as-you-go on all plans. Find out more.