WebP vs PNG vs JPG: Which Should You Use?
A practical comparison of the three most common web image formats — file size, quality, transparency, browser support, and when each format wins.
Published January 16, 2024
Choosing the right image format directly affects your page load speed, visual quality, and compatibility. Here’s a plain-English breakdown of when to use WebP, PNG, and JPEG.
The quick answer
| WebP | JPEG | PNG | |
|---|---|---|---|
| Best for | Most web images | Photographs | Logos, screenshots, transparency |
| Lossy compression | Yes | Yes | No |
| Lossless compression | Yes | No | Yes |
| Transparency | Yes | No | Yes |
| Animation | Yes | No | No (use APNG) |
| File size | Smallest | Medium | Largest |
| Browser support | 97%+ | Universal | Universal |
WebP wins on file size in almost every scenario. The main reason to choose JPEG or PNG over WebP is legacy tooling support or a specific workflow requirement.
JPEG: the old reliable
JPEG (or JPG — they’re the same format) has been the web’s primary photo format since the 1990s. It uses lossy compression: it permanently removes some image data to reduce file size, focusing on the detail the human eye is least sensitive to.
JPEG works well for:
- Photographs with complex colour gradients
- Images where some quality loss is acceptable
- Maximum compatibility (every device and tool in existence reads JPEG)
JPEG falls short on:
- Images with sharp edges, text, or flat colour — compression artefacts appear as blurry halos around edges
- Transparency — JPEG has no alpha channel at all
- Images you’ll edit repeatedly — each save re-encodes and degrades quality
A typical JPEG at quality 80 is a reasonable starting point for web photos. Going below 70 usually introduces visible artefacts.
PNG: lossless but heavy
PNG (Portable Network Graphics) was designed as an open alternative to the proprietary GIF format. It uses lossless compression, meaning every pixel is preserved exactly.
PNG works well for:
- Logos, icons, and illustrations with flat colour
- Screenshots and UI elements with text
- Images that need a transparent background
- Source files you’ll edit later
PNG falls short on:
- Photographs — lossless compression doesn’t help much when the source is noisy; PNG files can be enormous
- File size generally — for the same image, PNG is larger than JPEG and larger than lossless WebP
PNG-8 (256 colours) and PNG-24 (full colour) are the two main variants. PNG-8 is useful for simple graphics with few colours; PNG-24 handles the full colour range and full alpha transparency.
WebP: the modern default
WebP supports both lossy and lossless compression in the same format, plus a full alpha channel in both modes. Developed by Google and based on the VP8 video codec, it achieves substantially better compression than either JPEG or PNG.
WebP works well for:
- Almost everything on the web
- Photographs (lossy WebP at quality 80 ≈ JPEG at quality 90, with a ~30% smaller file)
- Transparent images (smaller than PNG, unlike JPEG which has no transparency)
- Animated images (substantially smaller than GIF)
WebP falls short on:
- Legacy tools — some older design software and CMS platforms don’t accept WebP as input
- Print workflows — WebP is RGB only; print uses CMYK
- Browsers before ~2019 (but coverage is now above 97%)
File size comparison
Here’s a representative comparison for a typical 1200×800 photograph:
| Format | Settings | File size |
|---|---|---|
| JPEG | Quality 90 | ~320 KB |
| JPEG | Quality 80 | ~200 KB |
| PNG (lossless) | — | ~1.1 MB |
| WebP (lossy) | Quality 80 | ~145 KB |
| WebP (lossless) | — | ~820 KB |
Results vary significantly with image content, but WebP consistently delivers smaller lossy files than JPEG, and smaller lossless files than PNG.
Choosing a format: the decision tree
-
Does the image need transparency?
- Yes → use WebP (lossless if pixel-perfect, lossy if compression is OK), or PNG if WebP isn’t an option
- No → continue
-
Is this a photograph or complex image?
- Yes → lossy WebP. Fall back to JPEG if you need universal tool support.
- No → lossless WebP or PNG
-
Will this be edited repeatedly?
- Yes → keep the source as PNG or TIFF; export to WebP for the web
- No → WebP directly
-
Do you need to support very old browsers?
- Yes → serve WebP with a JPEG/PNG fallback using the
<picture>element - No → WebP alone is fine
- Yes → serve WebP with a JPEG/PNG fallback using the
Using multiple formats with <picture>
If you need to support the rare browser that doesn’t handle WebP, the <picture> element lets you offer the best format the browser can handle:
<picture>
<source srcset="photo.webp" type="image/webp" />
<img src="photo.jpg" alt="Description" />
</picture>
The browser picks the first source it supports. Modern browsers take the WebP; older ones fall back to JPEG automatically.
Convert your images
Try our free in-browser converters:
- PNG to WebP — shrink PNGs without losing transparency
- JPG to WebP — smaller photos, same visual quality
- WebP to PNG — back to lossless for editing
- WebP to JPG — maximum compatibility output
Related: What is WebP? · How to use WebP in HTML