What Is the WebP Format? Size, Support, Limits

The WebP format reaches most people as an unfamiliar .webp extension on a downloaded picture, and it usually arrives with a number attached: 26% smaller than PNG, or 25-34% smaller than JPEG. Both figures come from Google's own measurements, and each holds only under the conditions Google states. Whether a saving of that size applies to a given image depends on how the comparison was made, which browsers decode the files, and where the format stops working.

What is a WebP file, and who defines it?

The IETF publishes the specification as RFC 9649, and a plain one holds a single still picture. RFC 9649 defines the image format and registers a media type for it, so a citable specification exists outside Google. A plain WebP file contains one image encoded as a VP8 key frame, which is one self-contained frame of the VP8 video codec used as a still picture.

MDN adds that the format supports higher color depths, animated frames and transparency. One extension can therefore carry a photograph, a graphic with a see-through background or a short animation.

This document defines the WebP image format and registers a media type supporting its use. / a file containing a single image encoded as a VP8 key frame

— from RFC 9649, Abstract and section 2

View official source →

WebP offers much better compression than PNG or JPEG with support for higher color depths, animated frames, transparency etc.

— from the MDN image file type and format guide

View official source →

How much smaller is WebP than JPEG or PNG?

Google's own comparisons give 26% against PNG and 25-34% against JPEG, and the larger claim rests on a quality condition. The 26% compares lossless files with PNG, and the 25-34% compares lossy files with JPEG at an equivalent SSIM quality index. SSIM is a score that rates a compressed image against its original, and "equivalent" means the files were compressed until the scores matched.

How much smaller Google's WebP files are (percent)

Bars show percent smaller. The JPEG comparison is a range, so its lower and upper ends are drawn separately, and both hold only at equal SSIM. Source: Google.

26%Lossless vs PNG
25%Lossy vs JPEG, low end
34%Lossy vs JPEG, high end

The study behind the JPEG range drew on three test sets, and their contents explain why an average hides a spread. Photographs, icons and scans respond to compression differently.

Test sets in Google's compression study

Test set Images or content
Kodak true color image suite 24
Tecnick.com collection 100
Crawled PNG images Mostly icons, graphics, charts, scanned documents

A logo, a screenshot and a portrait will not land at the same point inside 25-34%. The range describes a mixed set, so the image that matters most to a site is worth checking on its own.

WebP lossless images are 26% smaller in size compared to PNGs. / WebP lossy images are 25-34% smaller than comparable JPEG images at equivalent SSIM quality index.

— from "WebP: An image format for the Web"

View official source →

24 images from the Kodak true color image suite / 100 images from the collection available at Tecnick.com / Most of the crawled PNG images are icons, graphics, charts, scanned documents, etc. / We observed that the average WebP file size is 25%-34% smaller compared to JPEG file size at equivalent SSIM index.

— from the WebP Compression Study

View official source →

Does WebP keep transparency, and at what cost?

An alpha channel, the layer that stores see-through areas, adds 22% more bytes in lossless mode. Google states that figure for lossless WebP only, so it says nothing about lossy mode. The 22% is also not a comparison with PNG, which means it cannot be subtracted from the 26% saving to get a net result.

A logo on a transparent background is the usual case. The format keeps the transparency, and the extra bytes are the price Google quotes for keeping it in lossless mode.

Lossless WebP supports transparency (also known as alpha channel) at a cost of just 22% additional bytes

— from "WebP: An image format for the Web"

View official source →

Which browsers can display a WebP image?

MDN lists Chrome, Edge, Firefox, Opera and Safari, and it calls browsers without support increasingly irrelevant. A fallback JPEG behind a picture element is therefore a decision to weigh for each site and not an obligation. The case for one is a site whose own visitors include browsers outside that list.

Support: Chrome, Edge, Firefox, Opera, Safari / browsers without support become increasingly irrelevant

— from the MDN image file type and format guide

View official source →

WebP vs AVIF: better compression or wider support?

AVIF squeezes files a little further, but MDN records two costs: narrower browser coverage and no progressive rendering. Progressive rendering lets a large image appear in rough form before it finishes loading. A smaller file is therefore not automatically the better experience, and neither format is a pure upgrade over the other.

AVIF offers slightly better compression, but is not quite as well-supported in browsers and does not support progressive rendering.

— from the MDN image file type and format guide

View official source →

WebP image limits: dimensions, file size and screenshots

Width and height are stored in 14 bits, which caps a lossless image at 16384 by 16384 pixels. The whole file may be at most 4 GiB minus 2 bytes. Images made for screens rarely come near that ceiling, which matters mainly for files never meant for a screen.

For screenshots, MDN advises lossless encoding, because the blurring and colored fringes that lossy compression leaves around text and sharp edges are easy to see. Lossless WebP and PNG both meet that condition, so the choice between them comes down to file size on the actual image.

A .webp file that an older app refuses can be converted to PNG or JPG. The WebP converter on sakuttoAI does that conversion, and it also turns an existing PNG or JPG into WebP.

The 14-bit precision for image width and height limits the maximum size of a WebP lossless image to 16384x16384 pixels. / the size of the whole file is at most 4 GiB minus 2 bytes

— from RFC 9649, sections 2 and 5

View official source →

For screenshots, diagrams, logos, and line art, prefer lossless encoding, as blurring and colored fringes around text and sharp edges are very visible.

— from the MDN image file type and format guide

View official source →

Summary: the savings are conditional, support is not

Use WebP for web images once its quoted gains have been checked on real files, because every major browser decodes it and its ceilings sit far above screen sizes. The choice follows the kind of image:

  • Photographs and mixed libraries: lossy WebP, with a saving inside Google's range only when quality is held equal.
  • Logos and icons on transparent backgrounds: lossless WebP, which carries the alpha channel for 22% more bytes.
  • Screenshots: lossless encoding, in either PNG or lossless WebP.
  • Images beyond 16384 pixels on a side: another format, because a lossless WebP cannot hold them.

For converting between WebP and JPG or PNG, see Convert WebP to JPG or PNG, and JPG or PNG to WebP. For lighter images in the formats a site already uses, see Compress Images Online, Free: JPEG, PNG, WebP. The older pair is compared in JPEG vs PNG: which to use, tested on real images.

FAQ

Is WebP always smaller than JPEG?
Not unconditionally. Google says lossy WebP images are "25-34% smaller than comparable JPEG images at equivalent SSIM quality index", and that range comes from specific test sets, so it describes those comparisons and not necessarily the image being converted.
Which browsers can display a WebP file?
MDN lists Chrome, Edge, Firefox, Opera, and Safari, and says browsers without support are "increasingly irrelevant". A fallback JPEG is therefore a choice to make per site and not a routine requirement.
Should I use WebP or AVIF?
AVIF compresses a little better, but MDN records two costs: browser support is not as wide, and AVIF does not support progressive rendering. Neither is a pure upgrade over the other.
How large can a WebP image be?
RFC 9649 caps a lossless WebP image at 16384x16384 pixels, because width and height are stored with 14-bit precision. The whole file is at most 4 GiB minus 2 bytes.