kamsar / Dianoga

An automatic image optimizer for the Sitecore media library.
Other
104 stars 45 forks source link

Can we optimize .svg image using extension .webp? #62

Closed Dianoga007 closed 4 years ago

Dianoga007 commented 4 years ago

I have recently downloaded the latest version of Dianoga(5.0.0-rc.4). I am able to convert all png, jpg images to .webp extension (all getting optimized and loading properly). When I convert .svg to .webp, a broken image shows up. If I keep it .svg, image is loaded properly. Please guide me if we have some limitations converting svg to webp or am I missing something?

kamsar commented 4 years ago

Since SVG is already a vector format there is nothing to be gained by converting it to a raster format like WebP other than increased file size. Vector optimization is already applied to SVGs.

markgibbons25 commented 4 years ago

https://developers.google.com/speed/webp/docs/cwebp cwebp: Input format can be either PNG, JPEG, TIFF, WebP or raw Y'CbCr samples. gif2webp: converts a GIF image to a WebP image.