Lossy vs. Lossless Compression: A Plain-English Guide
Every image format makes a choice between two kinds of compression. Knowing which is which tells you exactly when to use PNG, JPG, or WebP.
Lossless: nothing is thrown away
Lossless compression shrinks a file by storing it more efficiently, with zero loss of detail — like packing a suitcase neatly. Unzip it and you get back exactly what went in. PNG works this way. The trade-off is that there's a limit to how small a detailed image can get without losing anything.
Lossy: throw away what you won't miss
Lossy compression goes further by permanently discarding detail the human eye is unlikely to notice — subtle colour shifts, fine texture in shadows. JPG works this way, which is why it makes photos so much smaller than PNG. The trade-off is that the loss is permanent, and pushing it too hard creates visible artifacts.
| Lossless (PNG) | Lossy (JPG) | |
|---|---|---|
| Detail kept | All of it | Most of it |
| File size | Larger | Much smaller |
| Best for | Graphics, text | Photographs |
| Re-saving | Safe | Degrades |
WebP does both
WebP can operate in either mode — lossless for graphics, lossy for photos — which is why it's such a flexible modern format. When in doubt, a lossy WebP at high quality gives you near-lossless looks at a fraction of the size.