How Much Quality Do You Lose Compressing an Image?
“Compress without losing quality” is the promise on every image tool — but lossy compression always trades some detail for size. The real question is how much, and where the trade stops being worth it. So we measured it: for the 24-image Kodak reference suite we saved every photo as JPEG and WebP across a full quality sweep, and scored each result on SSIM — structural similarity to the original, from 0 to 1. Here is the quality you actually pay for each kilobyte.
The quality–size curve bends fast
Plotting SSIM against file size (in bits per pixel) draws the whole story in one curve. It climbs steeply at first — the earliest kilobytes buy the most quality — then flattens hard: past about 1.5 bits per pixel you are paying a lot of size for very little extra similarity. WebP sits above and to the left of JPEG the whole way, meaning it reaches the same SSIM at a smaller size: about 29.6% smaller at SSIM 0.95 and 31.9% smaller at 0.97.
JPEG WebP — y-axis is SSIM (structural similarity to the original); each dot is a quality step from 20 to 95, mean of 24 images.
The last few quality points cost the most
Line up JPEG’s file size at rising quality settings and the acceleration is obvious. From quality 40 to 80 the file grows gently while SSIM improves steadily. Then it takes off: quality 85 is 14% of the original, quality 95 is nearly 26% — almost double the bytes — and the SSIM label barely climbs from 0.95 to 0.98. That top end is where “maximum quality” quietly spends your storage.
JPEG file size as a percent of the original PNG, by quality setting; SSIM labelled on each bar. Mean of 24 images.
This is why a good compressor defaults to the low-80s rather than 100, and why our Image Compressor shows you the exact size saved so you can stop where the preview still looks right. It varies by photo — across the 24 images, quality 85 ranged from SSIM 0.93 to 0.97 and 10% to 19% of the original — so the preview matters more than any single number.
The full sweep
Every row is the mean across the 24 Kodak images. “bpp” is bits per pixel (format-neutral size); “% orig” is size as a percent of the source PNG. For reference, staying lossless costs far more: an optimized PNG averages 13.4 bpp and lossless WebP 9.6 bpp — roughly 7× the size of a quality-85 JPEG.
| Quality | JPEG SSIM | JPEG % orig | WebP SSIM | WebP % orig |
|---|---|---|---|---|
| 20 | 0.829 | 3.8% | 0.850 | 3.0% |
| 30 | 0.865 | 5.0% | 0.877 | 3.8% |
| 40 | 0.885 | 5.9% | 0.896 | 4.6% |
| 50 | 0.900 | 6.8% | 0.909 | 5.3% |
| 60 | 0.912 | 7.8% | 0.921 | 6.1% |
| 70 | 0.926 | 9.3% | 0.930 | 6.9% |
| 75 | 0.933 | 10.3% | 0.935 | 7.4% |
| 80 | 0.942 | 11.8% | 0.948 | 9.0% |
| 85 | 0.952 | 14.0% | 0.960 | 11.3% |
| 90 | 0.963 | 17.7% | 0.971 | 15.0% |
| 95 | 0.977 | 25.7% | 0.982 | 22.2% |
SSIM is 1.000 for a perfect copy; neither lossy format reaches it — the highest here is WebP at quality 95 (0.982). Values are means; individual photos vary.
Reproduce this
No hand-picked examples — every number is the mean over a standard, public image set, produced by a short script you can run yourself.
- Images: the Kodak True Color suite — 24 × 768×512 PNGs, a long-standing benchmark set.
- Encoders: Pillow — JPEG via libjpeg at default chroma subsampling; WebP via libwebp, method 4.
- Metric: SSIM (scikit-image), computed on RGB with a data range of 255.
- Reported: the mean across all 24 images at each quality step.
SSIM is a structural proxy, not a perfect model of the eye, and other encoders (mozjpeg, cwebp settings) shift the exact figures — the shape of the curve is what generalizes. Want to try it on your own photo? Open the Image Compressor and watch the size and preview as you move the quality slider.