Converting SVG to raster format using Sanity asset pipeline

7 replies
Last updated: Apr 23, 2020
I know its a bit of a random scenario, but if I wanted to convert an SVG to a raster format (webp, jpg, png, whatever) would the Sanity asset pipeline let me do this? Use-case is where theres a complicated-as-heck vector illustration where the raster would be a smaller filesize.
Ah,
&fm=png
. Cheers. I was writing
format
lol
Thanks Knut!
You can set background colors as well
Yeah turns out I was changing URLs while reading the docs for the JS helper lib, absolutely my bad πŸ‘

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.

Was this answer helpful?