What Is WebP? How Google’s Image Format Works and Why It Matters

WebP is an image format developed by Google, released publicly in September 2010. It supports four capabilities within a single format specification: lossy compression for photographs, lossless compression for graphics, full alpha channel transparency in both compression modes, and animation. No other widely-supported web image format combines all four capabilities, making WebP the most flexible delivery format currently available for web use.

The format’s primary practical benefit is file size. At equivalent visual quality, WebP lossy files are consistently 25 to 34 percent smaller than JPG files. WebP lossless files are approximately 26 percent smaller than equivalent PNG files. These size reductions carry directly into faster page loads, lower bandwidth consumption, and improved scores on Google’s Core Web Vitals performance measurement.

The Technical Origin of WebP

WebP’s lossy compression is derived from VP8, a video codec developed by On2 Technologies. Google acquired On2 in February 2010 for approximately 124 million dollars and open-sourced both VP8 and WebP shortly after. VP8 was designed as an intra-frame video codec, meaning it was built to compress individual video frames independently rather than across sequences of frames. This design made the algorithm directly applicable to still image compression without modification.

The VP8-based compression algorithm uses predictive coding. For each block of pixels in the image, the encoder generates a prediction of what those pixels should look like based on the already-encoded adjacent blocks. It then encodes only the residual: the difference between the prediction and the actual pixel values. Because natural images contain significant spatial continuity (nearby pixels tend to have similar colours and brightness), the residuals are small for most blocks, and encoding small residuals requires fewer bits than encoding full pixel values.

WebP lossless uses a completely separate compression algorithm. It applies spatial prediction, a colour space transformation, palette coding, and LZ77 entropy coding in sequence. Each step reduces the statistical redundancy in the data before the final entropy coding stage. The two compression modes share the RIFF-based container format but are otherwise independent implementations with no shared code or parameters.

WebP File Size: Benchmarks and Real-World Data

Google published a benchmark in 2010 comparing WebP lossy against JPG across a large corpus of web images and reported an average file size reduction of 30 percent at equivalent visual quality. Independent testing by organisations including Cloudinary, Akamai, and the HTTP Archive has consistently reproduced results in the 25 to 34 percent range. The variation depends on image content: photographs with fine texture show larger reductions, while images with large flat-colour areas show smaller reductions.

Format comparison Compression type Transparency Animation Avg size vs JPG Q85 Avg size vs PNG
JPG (quality 85) Lossy No No Baseline 50% to 80% smaller
PNG Lossless Yes (8-bit alpha) No (APNG separate) 200% to 500% larger Baseline
WebP lossy (quality 80) Lossy Yes (8-bit alpha) Yes 25% to 34% smaller 60% to 80% smaller
WebP lossless Lossless Yes (8-bit alpha) Yes 50% to 300% larger ~26% smaller
GIF Lossless (256 colours) Yes (binary only) Yes 100% to 400% larger Similar or larger
AVIF Lossy and lossless Yes (12-bit alpha) Yes 50% smaller (approx) Similar to WebP lossless

The table above shows WebP lossy’s position: consistently smaller than JPG for photographic content, dramatically smaller than PNG for the same content, and with full transparency and animation support that neither JPG nor PNG provides without format-specific workarounds. The AVIF row illustrates that a newer format achieves even better compression, but at the cost of slower encoding times and reduced tool support.

Practical File Size Examples

Image type JPG Q85 PNG WebP Q80 Size saving vs JPG
High-detail photograph (2 MP) 450 KB 2.1 MB 310 KB 31%
Product photo on white (2 MP) 180 KB 420 KB 120 KB 33%
Hero image with person (1 MP) 220 KB 980 KB 155 KB 30%
Screenshot with UI and text (1080p) 390 KB 480 KB 210 KB 46%
Flat-colour illustration 65 KB 38 KB 28 KB (lossless) N/A (WebP lossless wins)

The screenshot row shows a larger saving than the photographic rows because WebP handles images with mixed content (continuous-tone areas alongside sharp text and UI elements) better than JPG’s block-based compression. JPG introduces visible ringing artifacts around text and sharp edges even at high quality settings, which forces higher quality settings to maintain acceptable appearance, inflating file size. WebP’s finer-grained compression handles these transitions more efficiently.

Browser and Platform Support

WebP support was inconsistent across browsers from 2010 to 2020 because Apple did not add WebP support to Safari until Safari 14. This created a deployment dilemma: serving WebP required either excluding Safari users from the optimisation or maintaining two versions of every image (WebP for Chrome/Firefox and JPG/PNG for Safari). The Safari 14 release in September 2020 closed this gap and made WebP safe to use as a primary delivery format without per-browser version detection.

Browser WebP support added Version Market share (2024)
Chrome (desktop and Android) January 2014 32 ~65%
Safari (iOS and macOS) September 2020 14 ~19%
Firefox January 2019 65 ~3%
Edge (Chromium) January 2020 79 ~5%
Samsung Internet 2015 4 ~3%
Opera March 2014 19 ~2%
IE 11 Never N/A Under 0.3%

At the operating system level, Windows 10 version 1903 (released May 2019) added WebP support to the Photos app and File Explorer. macOS Big Sur (November 2020) opened WebP files natively in Preview. Adobe Photoshop added native WebP support in version 23.2, released February 2022, which closed the last major gap in professional image editing tool support. GIMP has supported WebP since version 2.10 (2018). Affinity Photo added WebP support in version 2 (2022).

Transparency in WebP: How It Works

WebP supports full 8-bit alpha channel transparency in both its lossy and lossless compression modes. This is the same alpha channel depth as PNG, allowing each pixel to have any of 256 opacity levels from fully transparent to fully opaque. The alpha channel enables smooth anti-aliased edges with semi-transparent pixels, which PNG is known for.

In WebP lossy mode, the RGB channels (the visible colour data) are compressed using the VP8 algorithm with the quality setting controlling compression aggressiveness. The alpha channel is compressed separately using a lossless method regardless of the quality setting. This means the transparency mask is always preserved exactly, even when the visible pixel colours are compressed with some data loss. A product image with a removed white background saved as WebP lossy at quality 85 will have exact, pixel-perfect transparency on every edge while the visible image pixels are compressed efficiently.

Use the PNG to WebP converter to convert transparent PNG images to WebP without any server upload. The converter runs in the browser, preserves the alpha channel exactly, and produces a WebP file that can be used as a direct replacement for the PNG in any context that supports WebP.

WebP Animation vs GIF

Animated WebP (sometimes written as WebP-A) uses the same container format as still WebP but stores multiple frames with timing information. Each frame can be encoded as either lossy or lossless independently. The alpha channel is supported in animated WebP, which is a significant improvement over GIF’s binary transparency (GIF supports only fully transparent or fully opaque, with no semi-transparent states). Animated WebP files are approximately 64 percent smaller than GIF at comparable visual quality according to Google’s benchmarks.

The practical limitation for animated WebP adoption is tool support. Most image editors that support animated GIF creation do not yet have native animated WebP export, requiring a conversion step from GIF to WebP as a post-processing workflow. Browser support for animated WebP is equivalent to still WebP support and covers all major browsers since 2020.

WebP and Google Core Web Vitals

Google’s Core Web Vitals framework measures three aspects of page experience: Largest Contentful Paint (LCP), Cumulative Layout Shift (CLS), and Interaction to Next Paint (INP). For most content pages, LCP is the metric most directly affected by image format choices. LCP measures the time from the start of page navigation to when the largest visible content element in the viewport has finished loading and rendering.

For image-heavy pages, the LCP element is typically the hero image or the first visible product photograph. Reducing the byte size of this image by 30 percent through WebP conversion reduces the time the browser spends downloading it by 30 percent on a bandwidth-constrained connection, which translates directly into a lower LCP score. Google’s PageSpeed Insights tool explicitly flags images that have not been converted to a modern format as a specific optimisation opportunity and provides an estimated potential time saving based on the actual file size difference.

The LCP element must also be discovered early in the page loading process. Serve the LCP image element as a direct img tag in the HTML rather than loading it via JavaScript or CSS background-image, and add the fetchpriority="high" attribute to signal to the browser that this image should be downloaded before others. Format alone accounts for 25 to 34 percent of the image’s download time; resource prioritisation determines when that download starts relative to other page resources.

WebP vs AVIF: The Next Format

AVIF (AV1 Image File Format) is the still-image format derived from the AV1 video codec, standardised in 2019. AVIF achieves approximately 20 to 50 percent smaller file sizes than WebP at equivalent visual quality, with particularly strong performance on images with gradients, skin tones, and colour banding artifacts that are visible in WebP at lower quality settings. AVIF also supports a wider colour gamut and 12-bit alpha channel compared to WebP’s 8-bit alpha.

The practical limitation of AVIF in 2024 is encoding speed. AVIF encoders are significantly slower than WebP encoders, which creates a bottleneck for high-volume real-time image conversion workflows on servers. Browser support for AVIF reached approximately 93 percent of global users in 2024 (slightly lower than WebP’s 97 percent), with older versions of Safari on iOS still accounting for some of the remaining gap.

The recommended approach for sites that want to maximise image compression in 2024 is to serve AVIF as the first option and WebP as the fallback, using the HTML picture element. This delivers the smallest possible file to browsers that support AVIF while ensuring WebP serves to the remaining browsers. JPG or PNG as the final fallback in the img element covers any browser that does not support either modern format. Convert your images using the JPG to WebP converter for the WebP layer, and keep the original JPG as the legacy fallback.

Frequently Asked Questions

WebP is an image format developed by Google and released in September 2010. It was derived from VP8, a video codec Google acquired when it purchased On2 Technologies. WebP supports lossy compression, lossless compression, full alpha channel transparency, and animation within a single format specification.

WebP lossy files are consistently 25 to 34 percent smaller than JPG at equivalent visual quality. Google's benchmark across a large corpus of web images measured an average reduction of 30 percent. Independent testing by Cloudinary, Akamai, and the HTTP Archive reproduces results in the same range. The variation depends on image content: photographs with fine texture show larger reductions than images with large flat-colour areas.

Yes. WebP supports full 8-bit alpha channel transparency in both its lossy and lossless compression modes, the same alpha depth as PNG. In lossy mode, the RGB colour channels are compressed with the quality setting while the alpha channel is always compressed losslessly. This means the transparency mask is preserved exactly even when the visible pixels are compressed. A transparent-background image saved as WebP lossy will be significantly smaller than the equivalent PNG with the same transparency quality.

All major browsers support WebP. Chrome added support in January 2014 (version 32). Firefox added support in January 2019 (version 65). Edge added support in January 2020 (version 79). Safari added support in September 2020 (version 14). The Safari update in 2020 was the milestone that gave WebP effectively universal browser coverage. As of 2024, WebP is supported by over 97 percent of browsers in active use.

Yes, specifically Largest Contentful Paint (LCP). LCP measures the time from navigation start to when the largest visible content element has loaded. For image-heavy pages, the LCP element is typically the hero image. Converting that image from JPG to WebP reduces its byte size by 25 to 34 percent, which reduces download time by the same proportion on bandwidth-constrained connections. Google's PageSpeed Insights flags non-WebP images as a specific optimisation opportunity with an estimated time saving.

AVIF (AV1 Image File Format) is a newer format that achieves approximately 20 to 50 percent smaller file sizes than WebP at equivalent visual quality, with particularly strong performance on skin tones and gradients. AVIF has broader colour gamut support and 12-bit alpha compared to WebP's 8-bit alpha. The practical limitations are slower encoding times and slightly lower browser support (approximately 93 percent versus WebP's 97 percent in 2024). For most sites, the recommended approach is to serve AVIF first with WebP as a fallback using the HTML picture element.

Yes. Use the JPG to WebP converter to convert individual photographs to WebP directly in your browser without installing software or uploading files to a third-party server. The converter runs entirely in the browser, processes the image locally, and lets you download the WebP file immediately. For transparent images in PNG format, use the PNG to WebP converter instead.