Lossless vs Lossy Image Compression
Lossless compression reduces file size while preserving every pixel perfectly. Lossy compression achieves much smaller sizes by discarding data the human eye doesn't notice. Choosing the wrong type wastes either storage or quality.
How each works
| Lossless | Lossy | |
|---|---|---|
| Mechanism | Removes redundancy, no data lost | Discards visually imperceptible data |
| Quality after decompress | 100% original | Slightly degraded |
| File size reduction | Moderate (10–30%) | Large (50–90%) |
| Re-save quality | No degradation | Further loss each re-save |
| Formats | PNG, WebP (lossless mode), GIF, TIFF | JPEG, WebP (lossy mode), AVIF, HEIC |
Use lossless when
- Logos, icons, and UI assets — where sharp edges and flat colours must be exact
- Screenshots with text — JPEG artifacts on text are very visible
- Source files you'll edit repeatedly — each lossy re-save compounds quality loss
- Print production where every pixel matters
Use lossy when
- Photographs for web delivery — human eyes can't see the difference at 80–85% quality
- Social media images where fast load beats pixel-perfect accuracy
- Large batches of product photos for e-commerce
- Any final export you won't re-edit
The re-save problem
Each time you open and re-save a JPEG, quality degrades — even at 100% quality setting. If you need to edit an image multiple times, work in PNG or TIFF until the final export, then compress to JPEG once.
Frequently Asked Questions
Is WebP lossless or lossy?
Both — WebP supports both lossless and lossy compression modes. Most web usage is lossy WebP. Lossless WebP is typically larger than lossy but smaller than PNG.
Can I recover a losslessly-compressed original from a JPEG?
No. Once saved as JPEG, the discarded data is gone permanently.
What quality setting should I use for JPEG?
75–85% for web delivery — visually identical to 100% for most photographs. Below 70% starts showing visible artifacts on edges.
