Image Compression Explained: Lossy vs Lossless

What actually happens to image data during lossy and lossless compression, and how to choose based on the image's purpose.

"Compress this image" can mean two fundamentally different things depending on whether you choose lossy or lossless compression — and picking the wrong one for the situation genuinely matters.

Lossy compression: smaller files, permanently discarded data

Lossy compression (used by JPEG, and by WebP in its lossy mode) permanently discards some image data that's judged least noticeable to the human eye, in exchange for meaningfully smaller file sizes. Compress the same source image too aggressively, or repeatedly re-save a lossy-compressed file, and visible quality loss (blocky artifacts, color banding) becomes noticeable — this loss is cumulative and can't be undone by decompressing again.

Lossless compression: no data discarded, smaller gains

Lossless compression (used by PNG, and by WebP in its lossless mode) reduces file size purely by finding more efficient ways to represent the exact same data — no visual information is discarded at all. The trade-off is that file size reductions are meaningfully smaller than what lossy compression can achieve on the same image, especially for photographic content.

Which one to choose, and when

Lossy compression makes sense for web photos where some quality trade-off is acceptable in exchange for faster page loads — most viewers won't notice a reasonably compressed photo. Lossless compression matters more for images you might need to edit further later (re-compressing a lossy file repeatedly compounds quality loss each time), or for graphics and text where any visible artifact would be immediately obvious.

Compress with control over the trade-off

An image compressor that lets you adjust the quality/size trade-off directly gives you control over exactly where on that spectrum a specific image should sit, rather than a one-size-fits-all default.

The bottom line

Lossy compression trades permanent, cumulative quality loss for much smaller files; lossless keeps everything but saves less space — match the choice to whether the image will be re-edited or re-compressed later.

Try it yourself

Put this into practice with our image compressor.