Lossless and lossy are different promises
Lossless compression (PNG, and ZIP for files generally) stores the image more efficiently while keeping every pixel exactly. Decompress it and you get back precisely what went in. The saving is real but modest, because there is a hard limit to how compactly you can describe something without approximating it.
Lossy compression covers JPEG, WebP, AVIF and HEIC. It takes a different deal: it identifies detail your eye is least likely to miss, discards it permanently, and stores the remainder. That is how a 30 MB photograph becomes a 2 MB JPEG. The discarded detail is not compressed; it is gone.
What JPEG chooses to throw away
JPEG splits the image into 8-by-8 pixel blocks and describes each as a combination of patterns, from flat areas up to fine detail. The quality setting decides how many of those fine-detail patterns are kept. At high quality, nearly all survive. At low quality, only the broad strokes remain, which is why heavily compressed images look blocky.
It also exploits the fact that human vision is far more sensitive to brightness than to colour. JPEG typically stores colour information at half resolution, keeping brightness at full. You rarely notice — except on saturated red or blue edges against a contrasting background, where the colour smears slightly beyond the shape. That is not a mistake; it is the format working as designed.
Why sharp edges suffer most
JPEG was built for photographs, which are mostly smooth gradients. Hard edges — black text on white, an interface screenshot, a line drawing, a chart — are exactly the thing its approach handles worst. The abrupt transition needs many fine-detail patterns to describe, and those are the first discarded, leaving faint ripples around the edge known as ringing.
This is the entire reason the advice "use PNG for screenshots and JPEG for photographs" exists. It is not a stylistic preference; the two formats fail on different content.
Generation loss: the part that catches people out
Compressing an already-compressed image does not repeat the same loss. It applies a fresh loss to the approximation, and the errors accumulate.
Save a photograph as JPEG at 80% quality and it looks fine. Open that JPEG, save it again at 80%, and it looks slightly worse — not because 80% is worse the second time, but because the encoder is now approximating an image that already contains compression artifacts, and it treats those artifacts as real detail worth preserving. Repeat this twenty times and the image visibly degrades into blocks and colour smears. This is generation loss, and it is the mechanism behind every "deep fried" meme you have seen.
Two practical consequences:
- Always compress from your original. Not from a copy you compressed last week. One pass from the source beats three passes from copies, every time.
- Do not use a lossy format as a working file. If you are editing across several sessions, work in PNG and export to JPEG once at the end.
What compression cannot do
It cannot improve an image. Converting a low-quality JPEG to PNG preserves the artifacts perfectly in a larger file — the flaws are now part of the picture, indistinguishable to the encoder from genuine detail. Nothing about "converting to a better format" recovers what an earlier compression removed.
It also cannot add resolution. Scaling a small image up invents pixels by interpolating between the ones that exist. AI upscalers do this more convincingly by predicting what probably belonged there, but they are still guessing, not recovering.
How much loss is acceptable
For most purposes, more than people expect. The difference between maximum quality and around 75–80% is very difficult to see on a screen, and often halves the file. Below roughly 50% the artifacts become visible in smooth areas like skies and skin. Below 30% they are obvious.
This is why the compressor here searches for the highest quality that fits your budget rather than jumping to a fixed low setting. If your limit is generous, you keep nearly everything; the quality only drops as far as the target actually requires.
Related
- Why upload forms reject your photo
- Your photos carry your location
- JPG to PNG — why this does not undo the damage