SOLVED: Preview setup wrong in referenced type

3 repliesLast updated: Nov 29, 2025

I am having this issue, can someone please take a look and let me know what I could possibly have done wrong? I already checked for all the spellings and potential hidden special characters, I will attach some more references in the comment sections


SOLVED - leaving this here for anyone with similar issues, it looks like my setup for preview in the referenced type is wrong, I fixed it and it is working now
AI Update

Great to hear you solved it! For anyone else who stumbles upon this thread with similar issues, it sounds like the problem was related to preview configuration in a referenced document type.

This is a common gotcha in Sanity schemas. When you're working with references and trying to display them in the Studio (like in arrays, reference inputs, or search results), each referenced document type needs its own preview configuration defined in its schema.

A typical fix looks like this:

export default {
  name: 'author',
  type: 'document',
  fields: [
    {name: 'name', type: 'string'},
    {name: 'image', type: 'image'},
  ],
  preview: {
    select: {
      title: 'name',
      media: 'image'
    }
  }
}

Common issues that cause preview problems:

If you're still learning about previews, the Sanity documentation on previews covers all the details about select, prepare, and how to customize what shows up in the Studio UI.

Thanks for updating the thread with your solution - this kind of post helps the community a lot! 🙌

Show original thread
3 replies

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.

Related contributions