/webp

Investigating Google's webp image format

MIT LicenseMIT

webp

Investigating Google's WebP image format.

What?

Google's WebP image format provides superior compression and quality characteristics compared to its older JPEG and PNG counterparts.

How?

You can convert images to use the WebP format via the cwebp CLI tool provided as part of the libwebp codec. Simply download the appropriate libwebp version for your machine from the repository, then add the bin directory to your PATH so the cwebp tool is accessible via your terminal.

See Google's Getting Started docs for more information.

Generate Lossy Image (default)

  • $ cwebp {original-image} -o {new-image}.webp

Generate Lossless Image

  • $ cwebp -lossless {original-image} -o {new-image}.webp

Support

WebP caniuse.com stats

webp caniuse stats

Although we currently do not have cross-browser support for WebP, Google has provided a number of fallback options for us to use.

Testing

Type Result Size
Original game logo jpg 240kb
Compressed - lossy game logo webp 40kb
Compressed - lossless game logo webp lossless 173kb