WEBPery

WebP is Google's image format with lossy and lossless compression. Learn how it works, browser support, file sizes, transparency, and animation.

What is WebP?

WebP is a raster image format developed by Google for the web. It compresses photographs 25–34% smaller than JPEG and graphics ~26% smaller than PNG, while supporting transparency and animation in a single format. This guide defines WebP completely — its origin, compression, capabilities, browser support, and the decisions that determine when to use it.

For the catalogue-level format specification, see the WebP format overview. To start converting now, use JPG to WebP, PNG to WebP, or GIF to WebP.

WebP at a glance

AttributeValue
DeveloperGoogle
Announced30 September 2010
StandardRFC 9649, published November 2024
Pronunciation"weppy"
Compression modesLossy (VP8), lossless (VP8L)
Container formatRIFF
TransparencyAlpha channel in both lossy and lossless
AnimationSupported, with transparency and per-frame compression
Size vs JPEG25–34% smaller at equivalent quality
Size vs PNG~26% smaller (lossless)
Browser supportChrome, Firefox, Safari 14+, Edge, Opera — 96%+ of browsers
File extension.webp
MIME typeimage/webp

What is WebP?

WebP is an image file format that stores raster graphics using lossy or lossless compression. Google built it to reduce image file sizes on the web without reducing visible quality. One format replaces three: JPEG for photographs, PNG for graphics and transparency, and GIF for animation.

The format stores image data inside a RIFF container. A single .webp file can hold a lossy photograph, a lossless logo with transparency, or a multi-frame animation — the container signals which.

Who created WebP and when?

Google created WebP and announced it on 30 September 2010. Lossless and alpha-channel support followed in 2011, and animation support in 2012. The format became a formal internet standard as RFC 9649 in November 2024.

WebP derives from the VP8 video codec, which Google acquired through On2 Technologies in 2010. Its lossy compression reuses VP8's intra-frame coding, applied to single still images rather than video frames.

How does WebP compression work?

WebP compresses images with two distinct engines: VP8 for lossy data and VP8L for lossless data. Lossy encoding predicts each image block from its neighbours and discards visually redundant detail. Lossless encoding rewrites pixel data using reversible transforms, so the output is bit-identical to the source.

The mechanics of both engines — predictive coding, macroblocks, colour transforms, and palette indexing — are covered in WebP Compression: How VP8 and VP8L Encoding Works.

What is the difference between lossy and lossless WebP?

Lossy WebP discards image data permanently to reach smaller files; lossless WebP preserves every pixel exactly. Lossy suits photographs and continuous-tone images. Lossless suits logos, icons, screenshots, and line art with flat fills and hard edges.

Choosing the wrong mode either inflates file size or ships visible artefacts. The full decision framework lives in Lossy vs Lossless Compression: When to Use Each for WebP.

Does WebP support transparency?

WebP supports an 8-bit alpha channel in both lossy and lossless modes. Lossless WebP stores alpha inline with the colour data. Lossy WebP stores alpha in a separate, losslessly compressed chunk, so transparency stays crisp even when the colour data is lossy.

This dual support is unique among common web formats — JPEG has no transparency, and PNG has no lossy mode. See WebP Transparency: Alpha Channel in Lossy and Lossless Modes.

Does WebP support animation?

WebP supports animation through multiple frames stored in one file. Each frame can use lossy or lossless compression, carry its own transparency, and define its own duration and disposal method. Animated WebP files are typically 30–64% smaller than equivalent animated GIFs.

Animation requires the extended file format, signalled by a VP8X chunk. See WebP Animation: How Animated WebP Works and Compares to GIF and WebP vs GIF.

Which browsers support WebP?

WebP works in all current major browsers, covering roughly 96% of global usage. Chrome and Opera have supported it since 2014, Firefox since version 65 (January 2019), Edge since version 18, and Safari since version 14 (September 2020) on macOS Big Sur and iOS 14.

Internet Explorer never supported WebP. For older-browser fallbacks using the <picture> element, see WebP Browser Support: Compatibility & Fallback Guide.

How much smaller are WebP files compared to JPEG and PNG?

WebP files are 25–34% smaller than JPEG at equivalent quality and ~26% smaller than PNG for lossless graphics. Animated WebP is up to 64% smaller than animated GIF in lossy mode. These reductions lower bandwidth, speed up page loads, and improve Core Web Vitals.

Real-world savings depend on image content. Compare formats directly: WebP vs JPEG, WebP vs PNG, and WebP vs AVIF.

What is the WebP file extension and MIME type?

WebP files use the .webp extension and the image/webp MIME type. The MIME type was formally registered with IANA through RFC 9649 in November 2024. Servers must send Content-Type: image/webp for browsers to render the file correctly.

Every WebP file begins with the magic bytes RIFF, a 4-byte size, then WEBP. See WebP Media Type and MIME Type: image/webp Registration.

Is WebP better than AVIF?

WebP and AVIF serve different priorities. AVIF compresses 20–30% smaller than WebP and supports higher bit depths and wider colour. WebP encodes faster, has broader and longer-established browser support, and produces smaller files for simple graphics and small images.

Use WebP as the reliable default and AVIF where maximum compression justifies the trade-offs. The detailed comparison is in WebP vs AVIF.

How do I use WebP on my website?

Serve WebP through the HTML <picture> element with a JPEG or PNG fallback, so unsupported browsers still receive an image. Frameworks handle this automatically — see How to Implement WebP in Next.js with next/image. Most CMS platforms and CDNs can generate and deliver WebP based on the browser's Accept header.

Convert existing assets with WEBPery's browser-based tools — no upload required:

For performance context, see Core Web Vitals & Images.

What are the disadvantages of WebP?

WebP has three practical limitations. It is not supported in most email clients, so HTML emails still need JPEG or PNG. It has no support in Internet Explorer or very old browsers. Its maximum dimensions are 16,383 × 16,383 pixels, which constrains extremely large images.

For most websites these limits are minor. Where they matter, a <picture> fallback or a different format for the affected asset resolves them.

Where to go from here

Core WebP knowledge, in reading order:

WebP is the practical default for web images today: smaller files than JPEG and PNG, transparency and animation in one format, and support across every modern browser.

WebP Transparency: Alpha Channel Support

WebP supports an 8-bit alpha channel in lossy and lossless modes. How transparency is stored, the ALPH chunk, file-size cost, and PNG comparison.

srcset and WebP: Responsive Images with Format Fallback

Use srcset and sizes to serve responsive WebP at the right resolution per device, with a JPEG fallback. Width and density descriptors explained.

WebP File Structure: RIFF Container and Chunk Format

How a WebP file is structured: the RIFF container, the WEBP FourCC, and VP8, VP8L, VP8X, ALPH, ANIM and ANMF chunks. The byte layout explained clearly.

How to Serve WebP Images in HTML Using the picture Element

Serve WebP with a JPEG or PNG fallback using the HTML picture element. Syntax, source ordering, art direction, and the mistakes to avoid.