How AI is powering better personalization in e-commerce [with Vercel]. Sign up now

How to get SVGs from Sanity like images?

12 repliesLast updated: Nov 29, 2025

Hey! Is it possible to get SVGs the way we get images from Sanity natively? If yes, how can I do it?
AI Update

Yes, you can absolutely get SVGs from Sanity natively! SVG files are supported as image assets in Sanity's Content Lake.

How SVG Support Works

According to the official Sanity documentation on assets, Sanity supports SVG files as one of many image formats, including JPG, PNG, WebP, TIFF, GIF, HEIF, and AVIF (8-bit).

Important Behavior to Know

SVGs pass through the image pipeline untouched. This is a key detail - while Sanity's image pipeline can transform formats like JPEG, PNG, WebP, PJPG, TIFF, AVIF, and GIF, SVG and GIF files pass through the pipeline without being processed or transformed. This means:

How to Use SVGs

You can work with SVGs in Sanity the same way you work with other images:

The asset URL structure is the same as other images:

https://cdn.sanity.io/images/<project-id>/<dataset>/<asset-id>-<dimensions>.svg

Since SVGs are vector-based and already scalable, the fact that they pass through untransformed is actually ideal - you get the full quality and scalability benefits of the SVG format while still benefiting from Sanity's global CDN delivery.

Show original thread
12 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