Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

REST API only returns image id and not img url

default discord avatar
.kilosierralast year

I can only access all the nested data on my featuredImage object when logged into Payload CMS. If I make a request to /posts when not logged in, or from a different browser, featuredImage only shows an ID and not the full object. This means I can't access nested keys such as image url. I've attached screenshots



Also attached is a screenshot of my payloadconfig.ts file. I have cors configured to allow access from anywhere so I'm not sure what's causing this.



Can anyone help?



Thanks



I worked it out. I forgot to set access to read

    Star on GitHub

    Star

    Chat on Discord

    Discord

    online

    Can't find what you're looking for?

    Get dedicated engineering support directly from the Payload team.