Today I Learned

Great case for .webp format

While webp does not provide substantial size reduction when compared with JPG’s saved using MozJPEG encoder, there is a case where it really outperforms the competition and that is images with transparency.

For comparison we will use a photo of this fine gentleman, the base file is a full-color PNG that weighs 693kB. base

Normally to compress images with transparency, I used squoosh with OxiPNG, 256 colors and Dithering on, resulting in 214kB size. The image doesn’t look bad but we have lost some color, which is especially visible on the lips. png

With webp we set it to Browser WebP and quality 0,9. The result is only 63kB, with no colors lost and almost no artifacts. That is 30% of OxiPNG’s size! webp

Regarding the optimal compression setting, I would recommend 0,9 as the default base, with the max value of 0,99.