Compression comes in two families, and knowing which one you are using explains why a file
sometimes refuses to shrink.
Lossy compression: JPG and WebP
JPG and WebP store an approximation of the image. The encoder discards detail the
human eye is least likely to notice, and the quality setting controls how much it is allowed
to throw away. This is why a photograph at 80% quality can be a quarter of the size of the
original and still look the same on a screen.
Lossy compression is not reversible. Once the detail is gone, re-saving at a higher quality
will not bring it back, and re-encoding an already compressed JPG adds a second round of
damage without removing much extra data. That is why an already-compressed file sometimes
grows when you compress it again.
Lossless compression: PNG
PNG is lossless: the image that comes out is pixel-for-pixel identical to the image that went
in. It saves space by storing the data more cleverly, not by discarding anything. That is
excellent for screenshots and diagrams, and it is why PNG is a poor choice for photographs —
a photo saved as PNG is often several times larger than the same photo saved as JPG.
Because PNG cannot trade quality for size, the quality slider has no effect on it. The tool
disables the slider rather than leaving it looking functional, and the honest way to shrink a
PNG is either to reduce its dimensions or to convert it to WebP.
Why dimensions matter more than quality
Halving the width and height of an image reduces its pixel count to a quarter, and that
usually saves more than any quality setting. A 4000 pixel-wide photo displayed at
1200 pixels is carrying more than ten times the detail it needs. If you know where the
image will be shown, capping its dimensions is often the single most effective step.
What this tool does with your file
Your image is read from your disk into the page, drawn onto a canvas at the target size,
re-encoded by your browser, and handed back as a new file. The original is untouched. Every
output is inspected to confirm it really is the format you asked for, and the size comparison
you see is measured from the actual bytes rather than estimated.