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

Hi, I need help with a query for getting the url of an image asset.

3 replies
Last updated: Dec 1, 2020

Hi, I need help with a query for getting the url of an image asset.Here is what I've been trying, but I only get the _ref and _type and I need the url, I don't want to use urlFor() function because it is not an option for what I'm trying to achieve.

Dec 1, 2020, 9:41 AM

Why is urlfor not an option?

Dec 1, 2020, 12:09 PM

I need the data on a server side with minimal external package usages, why does that matter?

Dec 1, 2020, 2:02 PM

that worked, thanks 😊

Dec 1, 2020, 4:46 PM

Sanity.io: Get the most out of your content

Sanity.io 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.