✨Discover storytelling in the AI age with Pixar's Matthew Luhn at Sanity Connect, May 8th—register now

How to add an image or custom component at the top of a design in Sanity.io

4 replies
Last updated: Jun 11, 2023
Also, how can I do something like this where there is an image or a custom component at the top that shows what the design looks like on the front end? I screen shotted this from a Tinloof video.
Jun 11, 2023, 12:52 AM
user R
it's late rather than early over here, but glanced at this, and if I understand what you want, a custom input component on the schema (rather than on a field) will do this.
Here's an example of the pattern, with some screen images as well as source. It was a concept workout, and for most purposes you would put the content in another schema's documents rather than in the same document as I did in a sketch-up here, but the principle could be used either way.

It started out as just an answer to how to nicely get the image in Sanity, but weil be basis for some guides to write up before long....

(Removed Name)

(moved to a thread, where had been intended,)
Jun 11, 2023, 4:32 PM
user R
Maybe I misunderstood what you wanted here (esp. since I figured you knew how to do this)? Was it actually to put such an item above that preview list you were working on?
I'm not aware of access to do that, if there is any....
Jun 11, 2023, 5:13 PM
user Q
, you understood perfectly. The thread you referenced with (Removed Name) is precisely what I was looking for. Thank you so much!
Jun 11, 2023, 8:50 PM
Most welcome, then, (Removed Name) :)
It does feel a pretty useful move, so I want to get it written up with the full arrangement -- a few things ahead in line :) . You take care...
Jun 11, 2023, 9:25 PM

Sanity– build remarkable experiences at scale

Sanity is a modern 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?