The goal of compression isn't "smallest possible file." It's "smallest file that still looks good." These aren't the same target. Go too far and you'll see blocky artefacts; stop too early and you're paying for kilobytes you didn't need. Here's how to find the right balance.
What the quality slider actually does
For JPEG and WebP, the quality slider (0–100 in most tools) controls how aggressively the encoder discards information. Under the hood, both formats divide the image into small blocks and apply a Discrete Cosine Transform (DCT), converting pixel values into frequency components. High-frequency details — fine texture, subtle colour shifts — get quantized more heavily as quality decreases. At lower quality settings, the encoder uses a coarser quantization table: entire ranges of subtle variation get rounded to the same value.
The practical result: as you lower quality, the file shrinks, but the image starts to show blocky regions and ringing artefacts near edges. The relationship between quality and file size is not linear. The biggest gains happen at the top of the scale.
Where the savings really are
This is counterintuitive until you see it: going from quality 100 to quality 85 typically cuts file size by 40–60% for a photograph, with changes that are nearly impossible to spot without a side-by-side comparison at 100% zoom. Going from 85 to 70 might save another 15–25%, but this is where visible artefacts start appearing in busy areas like hair, grass, or fine fabric. Going below 65 trades obvious quality for diminishing file size returns.
A rough guide to what each quality range means in practice:
| Quality | Typical use | Artefacts? |
|---|---|---|
| 90–100 | Archiving, print, source files | None |
| 80–89 | High-quality web photos, e-commerce | Imperceptible |
| 70–79 | General web use, blog images | Subtle in complex areas |
| 60–69 | Thumbnails, previews | Visible on inspection |
| Below 60 | Low-bandwidth previews only | Noticeable |
The sweet spot for most images
75–85% covers the vast majority of photographs. At 80%, most people genuinely can't tell the difference from the original when viewing at normal screen sizes. The file is typically 60–75% smaller than 100% quality. That's where the tool's default sits — not arbitrary, but the result of where perceptual quality and file size trade off most favourably.
For product images, portrait photography, or anything where sharpness and fine detail matter commercially, 85–90% is a safer choice. For thumbnails, social preview images, or background images where pixel-level quality doesn't matter, 65–75% is fine and produces very small files.
Set quality to 80%, then zoom to 100% and look at the busiest parts of the image — areas with fine texture, hair, or text. If it looks clean, try 75%. If you can see blockiness, push up to 85%. Stop when you can't see the difference at the size the image will actually be displayed.
PNG doesn't have a quality setting — and that's the point
PNG is lossless. There's no quality trade-off: the decoded output is always pixel-perfect. The compression level setting (1–9) found in some tools only controls how long the encoder works — a higher level means slower encoding but no change in decoded quality or file size beyond a few percent.
If you need to make a PNG smaller and lossless won't cut it, you have three options:
- Reduce the image dimensions (fewer pixels = smaller file even when lossless)
- Convert to WebP lossless, which typically achieves 20–26% better compression than PNG for the same data
- Accept a lossy format (JPEG or lossy WebP) if transparency isn't required
WebP quality vs JPEG quality — not the same scale
WebP and JPEG both use a 0–100 quality scale, but they're not comparable values. WebP at quality 80 typically produces a file around 25–34% smaller than JPEG at quality 80, at similar perceived quality. If you're converting from JPEG to WebP, you don't need to raise the quality to compensate — the same quality setting will already give you a better result.
What the source quality matters
One thing the quality slider can't fix: the starting image. Compressing a blurry phone photo at 90% quality won't make it look like a crisp 75% image. The encoder preserves whatever is there, including blur, noise, and existing JPEG artefacts. If your source already has compression artefacts — from being downloaded off the web or shared via a messaging app — re-compressing it will stack more artefacts on top.
When possible, start from the original file: the RAW export from your camera, the PNG screenshot, or the uncompressed original. Don't re-compress something that's already been compressed multiple times.
Don't re-compress JPEGs unnecessarily
Every time you open a JPEG and save it as a JPEG again — even at 100% quality — you're re-applying lossy compression on top of the existing artefacts. After a few cycles, the degradation becomes visible. If you're editing images regularly, keep working copies in a lossless format (PNG, TIFF, or camera RAW) and export to JPEG only at the final step.
For more on picking the right format in the first place, see JPG vs PNG vs WebP. And if you want to understand how compression choices connect to page load time, read image formats and page speed.
Set quality, pick your format, and see the file size drop in real time — entirely in your browser.