Lossless vs Lossy Compression: What Actually Changes?
What each kind of compression discards, when to use each, and why "lossless" in a browser tool needs a careful definition.
Lossless compression keeps every pixel exactly. The file gets smaller only by storing the same pixels more efficiently. PNG is lossless; a PNG opened and saved again looks identical.
Lossy compression discards detail the eye is least likely to notice — subtle colour variation, fine texture, high-frequency detail. JPEG and WebP at quality below 100 are lossy, and the savings are much larger.
Lossy is not a flaw; it is a trade. A photograph at JPEG quality 80 is usually indistinguishable from the original and a fraction of the size. The trade only becomes visible at very low quality settings.
Be careful with repeated lossy saves. Each JPEG save discards a little more. Keep an original, edit that, and export a fresh JPEG each time rather than re-saving the same JPEG.
An honest note about this site: browser Canvas re-encoding means PNG output here is not a lossless optimiser. The compressor page states this plainly and never claims lossless PNG optimisation.