How much smaller are WebP files than JPEG and PNG?
| Compared with | WebP result |
|---|---|
| PNG, lossless | 26% smaller [2] |
| JPEG, lossy, at equivalent SSIM quality | 25–34% smaller [2] |
| PNG, with transparency in lossy mode | Typically about 3 times smaller [2] |
| GIF and APNG, animated | Reduced file sizes [2] |
Those are Google's figures for its own format. Your result depends on the picture, so run a few of your own photos through a converter and compare the file sizes. A flat logo with few colours and a busy photograph will not shrink by the same amount.
Can WebP do transparency and animation?
Yes to both. Google says WebP supports transparency in lossless and lossy modes, and lossless transparency costs just 22% additional bytes [2]. MDN lists support for animated frames and higher colour depths too, and rates WebP an excellent choice for both still and animated images [3]. That makes it a candidate to replace a transparent PNG logo, and an animated GIF. Check the result on a dark and a light background before you swap it in.
Will every visitor's browser show a WebP image?
Google says WebP is natively supported in major browsers including Chrome, Safari, Firefox, Edge and Opera [2]. MDN's image guide lists support in Chrome, Edge, Firefox, Opera and Safari [3]. MDN advises fallbacks to better-supported formats using the HTML picture element, which lets you offer a WebP file with a JPEG fallback [3].
<picture>
<source srcset="hero.webp" type="image/webp">
<img src="hero.jpg" alt="Our shopfront at opening time" width="1200" height="800">
</picture>
Keep the alt text on the img tag, because it applies whichever file loads. See alt text. Keep the original JPEG or PNG as well, so you can export again later.
How do I turn one JPEG into a WebP file myself?
Google ships a free command line tool called cwebp. It reads PNG, JPEG or TIFF files and writes a .webp file [5]. The -q option sets the compression factor from 0 to 100, and the default is 75. In lossy mode, a smaller number gives a smaller file with lower quality [5].
cwebp -q 80 hero.jpg -o hero.webp
That line reads hero.jpg, compresses it at quality 80 and writes hero.webp. For a flat logo, Google's examples add the -lossless flag instead [5]. Open both files side by side and keep the smaller one that still looks right to you.
Will switching to WebP improve my Core Web Vitals?
It can, where images are the slow part. Google says smaller, richer images make the web faster [2], and that is the whole case for the format. web.dev lists the img element among the elements that can count as the largest contentful paint [4], so a lighter hero photo can load sooner, and that is what LCP measures. It will not fix a slow server or heavy scripts. Check your score in PageSpeed Insights before and after, and see Core Web Vitals for what Google measures.
AVIF is a newer format. MDN says it offers slightly better compression than WebP, but is not quite as well supported in browsers [3].
Questions people ask
Is WebP better than JPEG?
For file size, Google reports lossy WebP is 25–34% smaller than comparable JPEG at equivalent quality [2]. JPEG still works everywhere, so many sites serve WebP with a JPEG fallback.
Does WebP lower image quality?
WebP offers both modes. Lossless keeps every pixel. Lossy discards some detail to save space [1][2]. Google's JPEG comparison is made at an equivalent quality index [2].
How do I convert images to WebP?
Use an image editor or converter that exports .webp, or let your site builder or CDN convert automatically. Google lists WebP as supported by many tools and software libraries [2].
Blog posts that use this term
See also
- LCP LCP, or Largest Contentful Paint, is how long a page takes to show its biggest image, text block or video after a visitor starts loading it.
- Core Web Vitals Core Web Vitals are three measurements of how fast, responsive and stable a web page feels to real visitors: LCP, INP and CLS.
- PageSpeed Insights PageSpeed Insights is Google's free tool that reports how fast a web page loads for real visitors and in a lab test, with suggestions to improve it.
- Alt text Alt text is a short written description of an image, stored in the image's alt attribute, that screen readers read aloud and search engines use to understand the picture.
- CDN A CDN is a group of servers in many places that keep copies of your website's files so each visitor gets them from a server close to them.
- Responsive design Responsive design is a way of building one website so its layout adapts to the screen it is shown on, from phone to desktop.
References
- WebP (Glossary), MDN Web Docs. Read 27/11/2026.
WebP is a lossless and lossy compression image format developed by Google.
- WebP: An image format for the Web, Google for Developers. Read 27/11/2026.
WebP lossless images are 26% smaller than PNGs and lossy images are 25-34% smaller than comparable JPEGs at equivalent quality.
- Image file type and format guide, MDN Web Docs. Read 27/11/2026.
WebP offers much better compression than PNG or JPEG with support for higher color depths, animated frames, transparency etc.
- Largest Contentful Paint (LCP), web.dev. Read 27/11/2026.
The types of elements considered for Largest Contentful Paint are: <img> elements
- cwebp: Compress an image file to a WebP file, Google for Developers. Read 27/11/2026.
cwebp compresses an image using the WebP format. Input format can be either PNG, JPEG, TIFF, WebP or raw Y'CbCr samples.