👀 Our most exciting product launch yet 🚀 Join us May 8th for Sanity Connect

Converting uploaded JPG images to WebP format in Sanity for use as background images on the frontend.

2 replies
Last updated: Aug 15, 2023
In Sanity when using
image
how should an uploaded image of format
jpg
be converted to
webp
to be used as a background image on the frontend? Im not seeing under
asset
a way to grab a webp. Can this be converted in Sanity after upload?
Aug 15, 2023, 9:05 PM
sanity doesn’t offer image conversions like that.
Aug 15, 2023, 10:24 PM
actually it does it seems. you just need append
auto=format
https://www.sanity.io/docs/image-urls#auto-777d41f23d56
Aug 15, 2023, 10:27 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?