Image format size benchmark: 20 real photographs, four encodings
Measured 2026-10-26 · 20 source photographs · same pixels, four encoders · no resizing
Every "compress your images" article quotes the same folklore numbers. This page is a measurement instead. We took 20 real photographs — gradients, textures, fine noise, smooth skies — and encoded each one four ways at full resolution, then recorded the byte size. The script and the raw JSON are in the repository, so you can reproduce it.
What the numbers say
- PNG is the wrong default for photographs. It averaged 259.2 KB — 86% larger than the same photo as JPEG q80. PNG's lossless compression cannot exploit photographic redundancy; it is built for flat colour and line art.
- WebP q80 is the best size/quality trade here. 16.0 KB average, 93.8% below PNG and 56% below JPEG q80, at a quality level where artefacts are hard to spot on photographs.
- Dropping JPEG quality 80 → 60 saves 34% of the bytes. That is a real saving, but it is visible on gradients and fine texture; use it for thumbnails, not hero images.
- Ratio matters more than absolute size. The per-image column shows the same ranking holds across a 20× size range, so these averages are not driven by one large outlier.
Per-image results
| Source | Pixels | PNG | JPEG q80 | JPEG q60 | WebP q80 | WebP vs PNG |
|---|---|---|---|---|---|---|
| bg_1000.jpg | 2560×1440 | 294 KB | 39 KB | 26 KB | 18 KB | 94% |
| bg_1001.jpg | 2560×1440 | 211 KB | 39 KB | 26 KB | 15 KB | 93% |
| bg_1002.jpg | 2560×1440 | 224 KB | 36 KB | 25 KB | 16 KB | 93% |
| bg_1003.jpg | 2560×1440 | 150 KB | 30 KB | 23 KB | 13 KB | 91% |
| bg_1004.jpg | 2560×1440 | 245 KB | 38 KB | 25 KB | 17 KB | 93% |
| bg_1005.jpg | 2560×1440 | 249 KB | 37 KB | 26 KB | 16 KB | 94% |
| bg_1006.jpg | 2560×1440 | 277 KB | 39 KB | 26 KB | 19 KB | 93% |
| bg_1007.jpg | 2560×1440 | 350 KB | 43 KB | 27 KB | 19 KB | 94% |
| bg_1008.jpg | 2560×1440 | 237 KB | 36 KB | 25 KB | 16 KB | 93% |
| bg_1009.jpg | 2560×1440 | 300 KB | 39 KB | 26 KB | 18 KB | 94% |
| bg_1010.jpg | 2560×1440 | 329 KB | 40 KB | 26 KB | 19 KB | 94% |
| bg_1011.jpg | 2560×1440 | 246 KB | 37 KB | 25 KB | 17 KB | 93% |
| aurora_2000.jpg | 1170×2532 | 272 KB | 35 KB | 22 KB | 15 KB | 95% |
| bloom_2002.jpg | 1170×2532 | 218 KB | 28 KB | 20 KB | 13 KB | 94% |
| ember_2007.jpg | 1170×2532 | 268 KB | 32 KB | 21 KB | 14 KB | 95% |
| metal_2001.jpg | 1170×2532 | 263 KB | 36 KB | 22 KB | 16 KB | 94% |
| mint_2006.jpg | 1170×2532 | 225 KB | 33 KB | 21 KB | 13 KB | 94% |
| ocean_2003.jpg | 1170×2532 | 286 KB | 35 KB | 22 KB | 15 KB | 95% |
| sand_2004.jpg | 1170×2532 | 306 KB | 38 KB | 24 KB | 14 KB | 95% |
| violet_2005.jpg | 1170×2532 | 232 KB | 36 KB | 22 KB | 16 KB | 93% |
Averages across all 20 images: PNG 259.2 KB · JPEG q80 36.4 KB · JPEG q60 24.1 KB · WebP q80 16.0 KB.
How to reproduce
python3 tools/bench.py --input photos/ --json out.json
Each image is opened with Pillow, converted to RGB, and saved four times in memory: PNG with optimize=True,
JPEG with quality=80 and quality=60 (both optimize=True), and WebP with
quality=80, method=6. No resizing, no metadata stripping beyond what Pillow does by default. The JSON on this
page is the direct output.
Convert your own images
The converter runs entirely in your browser — the file never leaves your machine, which is why there is no upload limit and no queue.
Open the image converter →