Skip to main content

image/webp

image

The MIME type for WebP images. WebP (Google, 2010) provides both lossy and lossless compression with typically 25–34% smaller files than JPEG/PNG at equivalent quality. Supports transparency (lossy WebP). Supported in all modern browsers since 2020. The preferred modern image format for web delivery.

Details

WebP is developed by Google based on the VP8 video codec (for lossy) and a derivative for lossless. Registered with IANA as image/webp.

Compression advantages (vs JPEG/PNG at equivalent quality): - Lossy WebP: ~25–34% smaller than JPEG - Lossless WebP: ~26% smaller than PNG - Animation WebP: smaller than GIF with better color support

Browser support: all modern browsers (Chrome, Firefox, Safari 14+, Edge). Safari was the last major browser to add support (2020).

Delivery pattern: - HTML: <picture><source type="image/webp" srcset="img.webp"><img src="img.jpg"></picture> - HTTP: Accept header negotiation – Accept: image/webp,image/jpeg;q=0.9 - CDNs like Cloudflare, Fastly auto-convert JPEG/PNG to WebP via Accept header

Animation: image/webp also serves animated WebP (replacing GIF) with much better compression.

Common use

Modern web images served to browsers, CDN-optimized image delivery

See Also