How Image Compression Works
Understand lossless and lossy encoding, pixel resizing, unchanged file sizes and the difference between measured savings and a quality setting.
By Nexurivo · Updated
Lossless and lossy encoding
Lossless compression represents the supplied pixels without discarding their information. Lossy encoding reduces bytes by accepting changes to the image, often controlled through a quality setting. JPEG is lossy; browser PNG encoding is lossless and does not use a JPEG-style quality slider. WebP can provide compact image output, but the result still depends on the actual encoder and settings. Neither a format change nor a lower quality number guarantees a particular percentage reduction for every source.
Resizing is a separate operation
A 2000 × 2000 image contains four million pixels. A 1000 × 1000 version contains one million, so halving both sides reduces the pixel count to a quarter. That can save space but also removes spatial detail. Nexurivo's regular compression preserves dimensions, while target-size workflows can reduce them when allowed. If a form specifies exact pixels, use the fixed-dimension workflow instead of assuming that a smaller file still meets the required width and height.
Why MB sometimes does not change
An image may already be efficiently encoded. Re-encoding it with the selected settings can produce the same size or a larger file. Regular compression then offers the smaller original instead of inventing savings. A rounded MB display can also hide a small real difference, and it is easy to inspect the original file by mistake after downloading. Compare the actual output bytes, result filename and dimensions. For PNG, changing lossy quality expectations will not make its browser encoder behave like JPEG.
Find a useful trade-off
Begin with the original and inspect a moderate-quality result. Look at text, hair, thin lines and gradients rather than judging only a reduced thumbnail. If a smaller result is needed, consider an allowed format change or smaller dimensions, while respecting the destination's rules. Do not repeatedly compress the last output: each lossy generation can accumulate artifacts. A clean source and an appropriate crop often provide a better starting point than aggressive settings applied to noise or blur.
Check privacy and batch results separately
Re-encoding commonly drops source metadata and may change color representation. Retaining an original also retains its metadata, so compression is not a substitute for the dedicated removal tool. In batch processing, inspect each item's success and actual savings because different images respond differently. Failed items do not become valid files simply because other queue items finish. A ZIP is a convenient package for completed outputs; already compressed images should not be expected to shrink substantially just by being placed in it.