Most articles about image and PDF compression give you vague advice: "use a higher quality setting" or "WebP is smaller." We got tired of that. So we took a real 5.8 MB photo and a real 2 MB PDF and actually ran them through a browser-based compressor at different settings, measuring the real output bytes. These are the actual numbers.
What we tested
We used a 4000×3000 gradient + noise photo (5.8 MB) to simulate a real high-resolution camera photo, and a 20-page text-heavy PDF. We ran them through a browser-based compressor and recorded the actual downloaded output bytes — no estimates.
| Input | Setting | Original | Compressed | Change |
|---|---|---|---|---|
| 5.8 MB photo | JPG, quality 80 | 6.08 MB | 2.0 MB | ↓67% |
| 5.8 MB photo | JPG, quality 75 | 6.08 MB | 1.6 MB | ↓74% |
| 5.8 MB photo | WebP, quality 75 | 6.08 MB | 869 KB | ↓86% |
| 5.8 MB photo | WebP, quality 85 | 6.08 MB | 1.67 MB | ↓73% |
| 5.8 MB photo | AVIF, quality 80 | 6.08 MB | 390 KB | ↓94% |
| 5.8 MB photo | JPG, quality 90 | 6.08 MB | 6.08 MB | ↑10% (bigger!) |
WebP vs JPG: the clear winner
On this photo, WebP at quality 75 produced an 869 KB file — an 86% reduction — while the same photo saved as JPG at quality 80 was still 2.0 MB. That is a more than 2× difference at the same visual quality for a modern browser. Even WebP at quality 85 (1.67 MB) was smaller than a JPG at quality 80 (2.0 MB).
If you serve images on a website, WebP is the practical default. It delivers most of the savings with broad browser support and instant processing.
AVIF: smallest, but slow — and parameter-sensitive
AVIF at quality 80 beat everything (390 KB, a 94% reduction). But it took 44.7 seconds to encode — roughly 10–15× longer than WebP — so it is not suitable for instant feedback. More importantly, AVIF is highly sensitive to its quality parameter: at quality 50 it made the photo larger (a 250% increase in our test). A bad AVIF setting can undo all the savings, so it is not a "set it and forget it" format.
The PNG expansion trap (this one surprises people)
The single biggest mistake for photos is exporting to PNG. When we saved the 5.7 MB photo as PNG, it ballooned to 31.9 MB — a 431% increase. That is because PNG is a lossless format; for a photo with natural noise and gradients, it stores far more data than the original.
PNG is for screenshots, line art, and images with transparency. For photographs, use WebP or JPG. If your PNG is bigger than the image you started with, that is the reason.
PDF compression: the honest truth
PDF compression is more nuanced than most tools admit. We tested a text-heavy 20-page PDF and a typical image-heavy PDF:
| Input | Result | Why |
|---|---|---|
| 20-page text PDF | ↓36.6% | Redundant structure removed (object-stream re-optimization) |
| Image-heavy PDF | ≈0% | Already-compressed embedded images can't be re-optimized structurally |
Here is the key insight: browser-based PDF compression optimizes document structure, not the embedded images themselves. A text-heavy PDF with redundant objects compresses well (36.6%). But a PDF whose pages are already-optimized images has no structural fat left to remove — so it barely shrinks.
Practical takeaways
- Use WebP at quality 75-80 for photos on the web — it's the best size-to-quality balance we measured.
- Never export photos as PNG — it can make them 4-5× bigger.
- Default to quality 80, not 90 — higher can actually increase file size.
- Resize to the real display width first — resizing a 4000px photo to 1920px saved 91% in 1.4s, the best bang-for-buck move.
- For PDFs, match the tool to the file — text PDFs respond to structural optimization; scans need image recompression.
Try these results yourself
Put the numbers to work with a free, local, no-upload compressor.
Open Image CompressConclusion
These are real numbers, not marketing claims. The pattern is clear: WebP is the best default for photos, quality 80 is safer than 90, PNG is a trap for photos, and PDF compression depends entirely on whether your file is text or image-heavy. Use the right format and the right setting, and you can cut image payloads by 70-86% with no visible loss.
