Image Compression Explained: What the Quality Slider Actually Does
Written by Toolsxulo Team · Last updated August 10, 2026
A quality slider looks like a simple dial, but it's controlling a real tradeoff: how much fine visual detail an encoder is allowed to throw away in exchange for a smaller file. Understanding what's actually happening underneath that slider makes it much easier to pick a setting that shrinks a file meaningfully without introducing visible damage. This guide covers how lossy compression works, why the same slider doesn't apply to every format, and how to choose a setting with intent instead of guessing.
Open the tool: Image CompressorWhat "Quality" Actually Controls
Formats like JPEG and lossy WebP compress an image by transforming its pixel data into a form where fine, high-frequency detail can be selectively discarded - detail human vision is comparatively less sensitive to, especially subtle color variation compared to brightness variation. The quality setting controls how aggressively that discarding happens: a high value keeps most of that detail and produces a larger file, a low value throws away more of it for a smaller file. Nothing about the image's pixel dimensions changes during compression - only how faithfully those pixels are reconstructed when the file is decoded.
Why PNG Doesn't Have a Quality Slider
PNG compression is lossless by design - it uses DEFLATE to pack pixel data more efficiently without discarding anything, so decoding a PNG always reconstructs the exact original pixels. That's precisely why there's no quality dial to turn: lossless compression is a fixed process, not a tunable tradeoff. To meaningfully shrink a PNG's file size, there's no option but to re-encode it into a format that does support lossy compression, such as JPEG or WebP, which is why a compressor tool converts PNG input into one of those formats rather than compressing the PNG itself.
Finding a Setting That Shrinks the File Without Visible Damage
For ordinary photos, quality values in the 70-85 range typically strike a good balance - the file size drops noticeably while the image stays visually close to the source at normal viewing sizes. Below that range, artifacts become more likely to show up as blockiness around edges, color banding in smooth gradients like skies, or a general softening of texture. The right number isn't universal, though - it depends on the image's content (a busy, detailed photo tolerates more compression than a smooth gradient) and how it'll be viewed, so comparing the live before/after preview at the actual display size is more reliable than defaulting to one fixed number every time.
Compression Is Not the Same Job as Resizing
It's a common mix-up: compression reduces file size by discarding data quality at the same pixel dimensions, while resizing reduces file size (among other things) by reducing the actual number of pixels. They solve different problems and often get used together - for example, resizing an oversized photo down to the dimensions it'll actually be displayed at, then compressing the result, typically shrinks the file far more than either step alone, since fewer pixels compress to fewer bytes even before quality is touched.
Frequently asked
- Does compressing an image lose quality every time I re-save it?
- With a lossy format like JPEG, yes - each re-save re-applies the lossy encoding on top of whatever's already there, and artifacts compound with every generation. Keeping an uncompressed or lossless master copy and compressing only for final output avoids that generational loss.
- Is there a difference between compressing to JPEG versus WebP at the same quality number?
- Yes - the quality scales aren't directly equivalent between formats, since they use different compression algorithms. WebP at a given quality value generally produces a smaller file than JPEG at the same number while looking comparably good, which is why it's worth comparing both directly rather than assuming the numbers translate one-to-one.
- Why does a compressed photo sometimes look fine on screen but rough when zoomed in?
- Lossy compression artifacts are usually most visible at high zoom or in large print, while they're much harder to spot at normal viewing distance and screen size - which is exactly why compression is such an effective tool for web use, where images are rarely inspected pixel by pixel.
- Should I compress an image before or after cropping and resizing it?
- After. Cropping or resizing first, then compressing the final result, avoids doing lossy compression work on pixels you're about to throw away, and lets the compressor optimize for the image's actual final dimensions rather than a larger source that will be discarded anyway.