Two ways to make an image smaller
Every image compression wants the same thing: a smaller file. There are two fundamentally different ways to get there.
- Lossless: the image is packed more cleverly, without losing a single pixel. When opened, it's exactly as before — like a ZIP archive you unpack again. Formats: PNG, GIF, TIFF, lossless WebP.
- Lossy: the image is made smaller by permanently discarding information — mostly detail the eye barely misses. This saves far more space, but the original never comes back. Formats: JPG, lossy WebP and AVIF.
That's the whole core. Everything else follows from this one difference.
The analogy
Lossless is like a folded letter: you make it smaller, but every letter is preserved, and unfolded it's complete again. Lossy is like a summary of the letter: shorter, the gist is there, but the exact wording is gone — and you can't reconstruct the original letter from the summary.
Why JPG degrades on every save
An important everyday rule follows from JPG's lossy nature: every re-save of a JPG discards more information. Open, tweak slightly, save again as JPG — and new artifacts have crept in. Over many rounds a photo becomes visibly mushy. So: export as JPG once, at the end, and keep the original or a lossless format for intermediate steps. A PNG, by contrast, stays identical on every save — lossless means: as many times as you like, without loss.
Lossless is not "better"
A common misconception: that lossless is the higher quality tier. It isn't — it's a different category. Lossless preserves perfect quality, but for photos it produces three to ten times larger files than lossy. For a photo on the web that would be pure waste: the lossy-discarded part is invisible anyway. The choice is not a quality question but a purpose question.
Which type when?
| Content | Best type | Format |
|---|---|---|
| Photo for the web | lossy | JPG / WebP |
| Logo, graphic, screenshot with text | lossless | PNG / SVG |
| Image with transparency | lossless | PNG / WebP |
| Archive original | lossless | TIFF / PNG |
| Work in progress | lossless | keep the original |
The format decision in detail — including the grey areas — is covered in our JPG vs PNG article.
The formats that can do both
WebP and AVIF are hybrids: they handle both types, and you choose when saving. A lossy WebP replaces JPG (smaller), a lossless WebP replaces PNG (also smaller). This flexibility makes them good modern default formats — you just need to know which variant you're producing. JPG (lossy only) and PNG (lossless only) take the decision off your hands, but also box you in.
💡 Tip: Compress JPG, PNG and WebP directly in the browser — no upload, free, and instant.
Conclusion
Lossless preserves everything but costs space; lossy saves space by discarding the invisible. Neither is "better" — each fits a purpose. Photos to lossy (JPG/WebP), graphics and archives to lossless (PNG/TIFF).