How lossy compression works
JPEG and WebP discard information the eye is least sensitive to. They work in a frequency domain, keeping the broad structure of an image and throwing away fine high-frequency detail — which is why compression artefacts appear first around sharp edges and text, and are almost invisible in smooth gradients or foliage.
The quality slider controls how aggressively that detail is discarded. Between 75 and 85 the loss is usually imperceptible at normal viewing size while the file is a fraction of the original. Below about 60, artefacts become visible: blockiness, colour banding and haloing around edges.
Compression is not reversible
Once detail is discarded it is gone. Re-saving a JPEG repeatedly degrades it further each time, even at high quality, because each pass compresses the already-compressed result. Always compress from the original, never from a previously compressed copy.
When the file gets bigger
Re-encoding an already well-optimised JPEG at high quality can produce a larger file than the original — the encoder is being asked to preserve detail that the previous compression already softened, and spends bits doing it. The tool reports this honestly rather than claiming a saving it did not achieve. If you see it, either lower the quality or keep the original.
Choosing a format
JPEG for photographs. It has no transparency, so transparent areas are composited onto white here rather than rendered black.
PNG is lossless — the quality slider does nothing. Right for screenshots, diagrams, line art and anything needing transparency. Wrong for photographs, where it produces files several times larger than JPEG for no visible benefit.
WebP is typically 25–35% smaller than JPEG at equivalent quality and supports transparency. Supported by every current browser, so it is the sensible default for the web unless you need to support something very old.