Posted on 18-Jan-2016
WebP is a new image format that provides lossless and lossy compression for images on the web. WebP lossless images are 26% smaller in size compared to PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at equivalent SSIM index. WebP supports lossless transparency (also known as alpha channel) with just 22% additional bytes. Transparency is also supported with lossy compression and typically provides 3x smaller file sizes compared to PNG when lossy compression is acceptable for the red/green/blue color channels.
Webmasters and web developers can use the WebP image format to create smaller and richer images that can help make the web faster.
Lossy WebP compression uses predictive coding to encode an image, the same methodology used by the VP8 video codec to compress keyframes in videos. Predictive coding uses the values in neighboring blocks of pixels to predict the values in a block, and then encodes only the difference (residual) between the actual values and the prediction.
The residuals typically contain many zero values, which can be compressed much more effectively. The residuals are then transformed, quantized and entropy- coded as usual. WebP also uses variable block sizes.
Lossless WebP compression uses already seen image fragments in order to exactly reconstruct new pixels. It can also use a local palette if no interesting match is found. This palette is continuously updated to re-use recent colors. This compression mode is named "VP8L" and shares some common features with the so-called LZ77 compression algorithm.
A WebP file consists of VP8 or VP8L image data, and a container based on RIFF. The standalone libwebp library serves as a reference implementation for the WebP specification, and is available from our git repository and as a tarball.
WebP is natively supported in Google Chrome and the Opera browser, and by many other tools and software libraries.
Developers have also added support to a variety of image editing tools. This release also provides the lightweight encoding and decoding library libwebp and the command line tools cwebp and dwebp for converting images to and from the WebP format. The full source code is available on the download page.
Convert your favorite collection from PNG and JPEG to WebP by downloading the precompiled cwebp conversion tool for Linux, Windows or Mac OS X.