WebP is a recent image format from Google aiming to offer lower file-sizes for lossless and lossy compression at an acceptable visual quality. It includes support for alpha-channel transparency and animation.
Lossless or lossy?You can keep all the original image while converting to webp with the lossless option. In lossy compression, we can configure “degradation” by changing WebP compression factor. In order to show the difference between compression factors, I’ve made the size comparison with the following qualities:
Lossless, no degradation75: Lossy, degradation but not appreciable at 100% zoom60: Lossy, degradation noticeable but acceptable for some scenariosSize comparisonComparing this format with the best-compressed-ones from the previous comparison has no sense. The reviewed sites use proprietary compression algorithms, and degrades images (not to the point to be noticeable, but you can see it zooming).
I used the original non-optimized images of each format. The tool used to convert the files was cwebp, from the webp ubuntu package.
The extrange result from lossless JPEG it’s explained on WebP documentationBrowsers supporthttps://caniuse.com/#feat=webp
Chrome, Firefox and Opera supports WebP, but Safari, IE and Edge does not. To display images correctly on Safari, Edge and IE11+, we can use the html5 picture tag.
Let’s see an example:
Display WebP images in Windows/OSX/LinuxThere are plugins for several image manipulation software. You’ll need to install windows codecs to view images natively, for osx there is a brew package, and on linux you can direcly install apt package but depending on your distro some viewers still do not support WebP.
Photoshop pluginhttps://developers.google.com/speed/webp/docs/webpshop
JPEG XL image formatJPEG XL is a work-in-progress compressed image format and/or file format that is yet another attempt to be the next JPEG. It was first announced around 2017–08. It is expected to be published as ISO/IEC 18181.
It’s already in the final stages of standardization, but we will wait a long time until browser embrace it:
Further readingHow WebP works (lossly mode)Google in-depth book about image optimizationHave a nice day.