Images
Image compression explained
Reviewed by the Tabreon team · Last updated: September 2026
Quick answer
Image compression reduces file size by removing redundant or less-perceptible data. Lossy compression (like JPEG) discards some detail permanently for a much smaller file; lossless compression (like PNG) shrinks the file without discarding any data.
Why this matters
Choosing the wrong compression approach can either bloat a file unnecessarily or introduce visible quality loss where it matters — knowing the tradeoff lets you pick intentionally.
Definition
Lossless compression re-encodes the same pixel data more efficiently, so decompressing it recovers the exact original image, pixel for pixel. Lossy compression instead approximates the image, discarding detail the human eye is less likely to notice (like subtle color gradients), which allows much greater size reduction at the cost of some fidelity.
How it works
A lossy compressor like JPEG divides the image into blocks, transforms each block's color data into a frequency representation, and then reduces the precision of the less visually important frequencies — this is what the "quality" slider controls. A lossless compressor like PNG instead applies pattern-based compression algorithms (similar in spirit to zip) that need no quality tradeoff, but generally can't shrink photographic images as much. In practice, most image compressors also strip metadata — EXIF camera data, GPS coordinates, color profiles — as part of the process, which accounts for some of the size reduction independent of the pixel data itself.
Lossy vs lossless
| Lossy | Lossless | |
|---|---|---|
| Common formats | JPEG, WebP (lossy mode) | PNG, WebP (lossless mode) |
| Recovers exact original | No | Yes |
| Compression ratio | Higher | Lower |
| Best for | Photos | Screenshots, logos, graphics with sharp edges |
Common mistakes
- Repeatedly re-saving a JPEG at a lossy setting, compounding quality loss with each save.
- Using PNG for photographs, resulting in a much larger file than a well-compressed JPEG for similar visual quality.
- Compressing so aggressively that blocky artifacts become visible, especially around sharp edges or text.
Best practices
- Use lossy compression (JPEG/WebP) for photographs where some quality loss is imperceptible at normal viewing sizes.
- Use lossless compression (PNG) for screenshots, logos, or images with sharp edges and text.
- Always compare a before/after preview rather than trusting a fixed quality percentage.