Closed surjithctly closed 3 years ago
Hey @surjithctly, thanks for opening this issue. I just noticed the Sanity CDN supports automatic content negotiation using the auto=format
option. I've included this by default and released a 2.0.0
version which is now available on npm!
Do note that the URL still refers to the original content type (for example when the uploaded file is .png), but the returned content type is webp if this is supported by your browser. You can see this behavior in the network tab of your browser's devtools.
Awesome. Just tried and works perfectly. Thanks for fixing it quite fast 👍
First of all, thanks a lot for this plugin. It makes things easy.
next/image
supports conversion towebp
format on supported browsers. Similarly, Sanity also supportswebp
transformations. So, how can I use that feature while using your plugin? is it possible now? if yes, can you show an example?webp
on modern browsers, JPG on old/unsupported browsers.If no, I have realized you are also planning for a v2 release. Would you consider this feature as well?
Thanks again
~Surjith