Google released WebP in 2010, derived from the VP8 video codec. It took a decade to achieve universal browser support — Safari was the final holdout until September 2020 — but in 2026, WebP is the format you should reach for first when putting images on the web. It beats JPEG on file size, matches PNG on lossless quality, and handles animation better than GIF.

This guide covers everything: how VP8 lossy and VP8L lossless actually work under the hood, how the alpha channel compression differs from PNG's approach, what quality settings to use, where WebP still falls short, and when you should skip it entirely. Real numbers, real tradeoffs, no hand-waving.

If you're already convinced and just need to convert, convert PNG to WebP or convert JPG to WebP — free, in your browser.

What Is WebP and Why Does It Exist?

WebP exists because JPEG was designed in 1992 and PNG in 1996. Both formats were groundbreaking for their era, but modern compression research has advanced dramatically. Google needed smaller images to make the web faster — every kilobyte saved across billions of page loads translates to measurable reductions in bandwidth, loading time, and carbon emissions.

The key insight was that video codecs had already solved much of this problem. Video compression handles sequences of similar images (frames), and a single still image is just one frame. Google took the VP8 video codec (used in WebM video), extracted the intra-frame compression, and wrapped it in a new container. That's WebP lossy mode.

For lossless compression, Google built a completely separate codec called VP8L. It shares the WebP container format but uses entirely different algorithms — spatial prediction, color cache, Huffman coding, and backward references. VP8L has nothing to do with VP8 except the name.

VP8 Lossy: How WebP Compresses Photos

WebP's lossy mode uses variable-size macroblocks — 4x4, 8x8, and 16x16 pixel blocks — compared to JPEG's fixed 8x8 DCT blocks. This is the single biggest reason WebP outperforms JPEG. Uniform areas like sky or solid backgrounds use large 16x16 blocks (fewer coefficients, smaller file), while high-detail areas like text or edges use 4x4 blocks (more precision where it matters).

Prediction and Transform

Before compression, VP8 predicts each block's content from already-decoded neighboring blocks. It offers 4 prediction modes for 16x16 luma blocks (DC, vertical, horizontal, TrueMotion) and 10 modes for 4x4 blocks. Only the residual — the difference between prediction and actual pixel data — gets transformed and quantized.

The transform step uses a Walsh-Hadamard Transform (WHT) for DC coefficients of 16x16 blocks and a DCT variant for the 4x4 residuals. Because the residuals are typically smaller than the raw pixel values, the quantization step can discard less information while achieving the same file size. This is why WebP preserves detail better than JPEG at equivalent file sizes.

Chroma Subsampling

Like JPEG, WebP converts RGB to YUV color space and subsamples chroma (color) channels at 4:2:0 — halving color resolution both horizontally and vertically. This exploits the human eye's lower sensitivity to color detail compared to brightness. The result: roughly 50% less chroma data with minimal visible impact on photos.

Unlike JPEG, WebP doesn't offer 4:4:4 (full chroma resolution) in lossy mode. For images where chroma detail matters — red text on white backgrounds, sharp color transitions in diagrams — this forces visible artifacts. In those cases, use lossless WebP or PNG instead.

VP8L Lossless: Beating PNG at Its Own Game

VP8L is architecturally different from VP8. It doesn't use block transforms or quantization. Instead, it applies a series of reversible image transforms, then compresses the result with entropy coding.

The Transform Pipeline

Predictor transform: Each pixel is predicted from its neighbors using one of 14 prediction functions (average, select, various directional modes). The predictor choice is stored per 4x4 tile, so different regions of the image can use different strategies. The compressed data stores residuals — differences between predictions and actual values.

Color transform: Decorrelates color channels by predicting green from red, and blue from red+green. Natural images have strong inter-channel correlation (a bright red pixel usually has brighter green and blue too), so this transform reduces entropy significantly.

Subtract Green transform: A simplified version of the color transform that just subtracts the green channel from red and blue. Cheap to compute and surprisingly effective for photographic content.

Color indexing (palette) transform: If the image has 256 or fewer unique colors, VP8L switches to indexed mode — similar to PNG's palette mode but with VP8L's more efficient entropy coder. For simple graphics, this produces files 20-30% smaller than indexed PNG.

Lossless WebP vs PNG: The Numbers

Google's original study showed lossless WebP files are 26% smaller than PNG on average. In practice, the gap varies by content type. Photographic images see 25-35% reduction. Simple graphics with few colors see 10-20%. Already-optimized PNGs (run through pngquant + oxipng) see 5-15% — PNG optimization closes the gap but doesn't eliminate it.

The encoding speed difference is notable: lossless WebP at maximum effort (method 6) is 5-10x slower than PNG encoding. At method 4 (a good balance), it's 2-3x slower. Decoding speed is comparable to PNG. For build-time asset processing, the encoding speed rarely matters. For real-time conversion, it can.

Alpha Channel: WebP's Hidden Advantage

PNG handles transparency as an all-or-nothing proposition: the entire image is lossless, including the alpha channel. If you want a transparent photograph, you get a huge lossless file. WebP decouples the channels.

In lossy WebP, the RGB data is compressed with VP8 (lossy), but the alpha channel is compressed separately with VP8L (lossless). You get a small file from lossy RGB compression and perfectly sharp transparency edges. A product photo on a transparent background might be 40KB as lossy WebP with lossless alpha — compared to 200KB as PNG24+alpha or 80KB as JPEG with no transparency at all.

This is particularly valuable for e-commerce product images, UI components with drop shadows, and any case where you need transparency without the file size penalty of full lossless compression.

Animated WebP: The GIF Replacement

Animated WebP uses the same VP8/VP8L codecs applied per-frame, with frame-level options for blending and disposal. Each frame can be lossy or lossless independently, and frames can be smaller than the canvas (only encoding the changed region).

File size improvements over GIF are dramatic: Google's test corpus showed animated WebP files are 64% smaller than equivalent GIFs on average. A 5MB GIF loop typically becomes 1.5-2MB as animated WebP with better color fidelity (full 24-bit color vs GIF's 256 colors) and smooth alpha transparency instead of GIF's binary on/off.

The main limitation: animated WebP doesn't support inter-frame prediction (no motion vectors between frames like video codecs use). Each frame is still independently compressed. For smooth video content, MP4/WebM will always be dramatically smaller. Animated WebP is best for short loops, UI animations, and sticker-style content where video elements feel heavy.

Need to convert? Convert GIF to WebP for smaller animated files, or convert GIF to MP4 if you want maximum compression.

Quality Settings: What the Numbers Actually Mean

WebP quality is a 0-100 scale, but it behaves differently from JPEG quality.

Lossy Quality Recommendations

Quality 75-80: The sweet spot for most web images. Visually indistinguishable from the source on typical screens. A 1920x1080 photo is typically 80-150KB at quality 80. This is where you should start.

Quality 85-90: For images where quality matters — product photography, portfolio sites, hero images. Files are 30-50% larger than q80 with marginal visible improvement. Use this when you're serving a single key image, not a grid of thumbnails.

Quality 50-70: Acceptable for thumbnails, previews, and images viewed at small sizes. Artifacts become visible at full size but are invisible at 200x200 display dimensions.

Quality 90-100: Almost never worth it. Quality 95 WebP is typically only 10-15% smaller than lossless WebP — at that point, just use lossless. Quality 100 in WebP is not lossless (this catches people off guard). It simply minimizes quantization but still applies lossy transforms.

Encoding Effort (Method 0-6)

WebP's -m parameter controls encoding effort from 0 (fastest) to 6 (smallest file). Method 0 is roughly 10x faster than method 6 but produces files 5-10% larger. Method 4 is the practical sweet spot — 90% of method 6's compression at 3x the speed.

For build-time processing (generating assets once, serving many times), always use method 6. For real-time conversion (user uploads), method 4 or lower keeps encoding time under 1 second for typical web images.

Browser Support in 2026

WebP is supported in Chrome (since v23, 2012), Firefox (since v65, 2019), Safari (since v14, 2020), Edge (since Chromium switch), and all Chromium-based browsers. Global support exceeds 97% of users as of early 2026.

The remaining 3% includes Internet Explorer (dead but haunting corporate intranets), ancient Safari versions on older iOS devices that haven't updated, and some niche browsers. If you need to support these, use the <picture> element with JPEG fallback:

<picture><source srcset="image.webp" type="image/webp"><img src="image.jpg" alt="..."></picture>

Email clients are the notable exception. Gmail, Outlook, Apple Mail, and most email clients still don't reliably render WebP. For email images, stick with JPEG or PNG.

When NOT to Use WebP

WebP is great for web delivery, but it's the wrong choice in several common scenarios:

Email, Print, and Legacy Systems

Email: Most email clients don't support WebP. Gmail strips it, Outlook ignores it, and Apple Mail's support is inconsistent. Use JPEG for email images. Always.

Print: Print workflows expect TIFF, PDF, or high-quality JPEG. Print shops won't accept WebP files, and the 8-bit color depth is insufficient for high-end print work. Use TIFF (16-bit) or JPEG (quality 95+) for print.

CMS and social media: Some CMS platforms (older WordPress installs, legacy Drupal) and social media upload endpoints reject WebP. They accept it inconsistently — Facebook handles WebP uploads fine, LinkedIn sometimes strips metadata. Test before committing to a WebP-only workflow.

Archival: WebP is a Google-controlled format. For long-term archival (decades), use PNG or TIFF — formats with multiple independent implementations and ISO standardization. WebP's spec is well-documented but controlled by a single entity.

When AVIF Is Better

AVIF beats WebP on compression by 20-30% at equivalent visual quality. It supports 10-bit and 12-bit color for HDR content. It handles fine gradients (sky, skin tones) with fewer artifacts. If your audience is on modern browsers (Chrome 85+, Firefox 93+, Safari 16+) and you can afford the slower encoding time, AVIF is the better choice.

WebP wins on encoding speed (5-20x faster than AVIF), broader browser support (97% vs ~93%), and ecosystem maturity. Every image CDN, build tool, and CMS plugin supports WebP. AVIF support is catching up but isn't universal yet.

The practical recommendation: use AVIF as your primary format with WebP as fallback. The <picture> element makes this easy: <source srcset="img.avif" type="image/avif"><source srcset="img.webp" type="image/webp"><img src="img.jpg">

Technical Limitations

Maximum dimensions: 16,383 x 16,383 pixels. This is rarely a problem for web delivery but rules out WebP for very large panoramas, scanned posters, or GIS imagery. Use TIFF or JPEG XL for oversized images.

Color depth: 8-bit per channel only. No 10-bit, 12-bit, or 16-bit support. This means no HDR, no wide color gamut beyond what 8-bit can represent, and visible banding in extreme gradients. AVIF solves this with 10/12-bit support.

No CMYK: WebP only supports RGB and RGBA. It can't represent CMYK color spaces used in print workflows. Converting a CMYK TIFF to WebP forces a color space conversion that may shift colors.

Metadata limitations: WebP supports EXIF and XMP metadata, but some tools strip it during conversion. If metadata preservation matters (GPS, camera settings), verify your toolchain preserves it end-to-end.

Progressive loading: WebP doesn't support progressive rendering like progressive JPEG. The image either loads or it doesn't — there's no blurry-to-sharp loading experience. For above-the-fold hero images, this can feel slower even if the file is smaller.

Converting To and From WebP

The most common WebP conversion scenarios and how to handle them:

JPEG to WebP: The standard web optimization path. Expect 25-35% file size reduction at equivalent quality. Use lossy WebP quality 75-80 for general use, 85 for hero images. Convert JPG to WebP here.

PNG to WebP: Use lossless WebP for graphics that need perfect fidelity (screenshots, diagrams). Use lossy WebP for photographs that were saved as PNG unnecessarily. Convert PNG to WebP here.

WebP to JPEG: Necessary for email, print, or legacy systems. Quality loss is unavoidable (lossy-to-lossy transcoding). Always convert from the highest-quality source available. Convert WebP to JPG here.

WebP to PNG: Lossless conversion preserves whatever quality the WebP contains. Useful for editing (most editors handle PNG better than WebP) or compatibility. Convert WebP to PNG here.

GIF to WebP: Animated GIF to animated WebP reduces file size by 50-64% with better color and transparency. Convert GIF to WebP here.

WebP is the pragmatic default for web images in 2026. It's not the most advanced format (AVIF compresses better), not the most compatible (JPEG works everywhere), and not the most capable (AVIF handles HDR). But it sits at the intersection of good compression, wide support, and ecosystem maturity that makes it the right first choice for most web developers.

The ideal setup: serve AVIF to browsers that support it, WebP as the primary fallback, and JPEG for everything else. ChangeThisFile handles all three paths — JPG to WebP, PNG to WebP, WebP to JPG, and WebP to AVIF — free, with most conversions running entirely in your browser.