HandyVale › Guides

Image Optimizer: What the Quality Slider Actually Does to Your File

Updated 2026-10-26 · handyvale.com

Short answer

An optimizer trades bytes for pixels, and the trade is measurable. On one 3,019,770-byte test photo (3,000 × 4,000, no metadata), saving at quality 85 with the encoder’s optimize flag cut the file to 1,638,783 bytes — 45.73% smaller — while 53.834% of pixels changed and the largest single-pixel shift was 58 of 255 levels.

Three findings settle most arguments: pushing quality past 95 makes the file bigger than the one you started with (quality 96 = 107.07% of the original); three levers cut bytes without touching a single pixel (progressive −7.5%, optimize flag −1.6%, metadata strip 22,217 bytes on a real camera file); and running the same optimizer twice adds almost nothing — the second pass moved 0.042% of pixels by more than 10 levels. The first pass is the expensive one.

Browser-side processing — your image is never uploaded · No login · No watermark · No file-size or use limit · Export PNG, JPG or WebP

What an optimizer is allowed to touch

Every optimizer on the first page of results — the browser-based compressors, the Mac app, the CDN service, the store listing — sells the same sentence: smaller file, same-looking image. The sentence hides the machinery. Under the hood there are exactly four levers, and they are not equally innocent.

The tool pages show you sliders. They do not show you what a slider position costs on your file, in pixels and in bytes. That is the gap this page measures, on two real files, with one encoder, start to finish.

The quality ladder, measured end to end

One photo (3,000 × 4,000, 3,019,770 bytes), one encoder (Pillow 13.0.0, default chroma subsampling), quality 30 through 98. “Changed” is the share of the 12,000,000 pixels whose decoded value differs from the original; “>10 levels” is the share that moved by more than 10 of 255 steps.

QualityBytes% of sourceMax shiftChanged>10 levels
30699,09123.15%10865.033%17.082%
40803,90326.62%10798.329%15.097%
50902,90829.90%10263.134%13.597%
601,010,11133.45%9662.289%12.150%
701,175,39638.92%8993.512%10.358%
801,453,93248.15%6856.263%7.816%
851,666,96955.20%5853.834%5.470%
902,191,02772.56%4850.218%3.711%
952,993,03699.11%3828.753%0.400%
983,884,154128.62%3432.319%0.341%

Bytes fall smoothly as quality drops. Pixel damage does not. At quality 40, 98.329% of pixels move while at quality 50 only 63.134% do — the aggressive setting flattens whole regions into blocks (a large shift on fewer pixels), the middle settings dither boundaries (a small shift on more pixels). Anyone quoting a single “percent of pixels changed” number without the quality setting is quoting noise.

source file = 3,019,770 bytes (100%) 100% 0 50% 699Kq30 804Kq40 903Kq50 1.01Mq60 1.18Mq70 1.45Mq80 1.67Mq85 2.19Mq90 2.99Mq95 3.88Mq98 bigger than the source
Same photo, same encoder, quality 30–98. The dashed line is the original file. Past quality 95 the output grows past the input.

The crossover sits between quality 94 and 96

Zoom into the top of the ladder: quality 90 lands at 72.56% of the source, 92 at 80.92%, 94 at 92.58%, 95 at 99.11%. Then it flips. Quality 96 is 3,233,373 bytes — 107.07% of the original — and quality 98 is 3,884,154 bytes, 128.62% of the file you fed in.

A slider dragged to “maximum quality” can hand back a file 28.62% larger than the one you uploaded. The reason is arithmetic, not mystery: a JPEG stores what the first encoder chose to keep. Re-encoding at a higher setting spends bytes re-describing detail the original already discarded — including its compression noise. If the goal is a smaller file, the useful range ends around 90–92, and everything past 95 is paying to grow.

Your call: what this file is for — an archive you may re-edit, a web page, or a print job — decides how much drift you accept. That job is something only you know; the table above cannot decide it for you.

Chroma subsampling is a second, hidden quality slider

Most tools never mention it. At quality 85, the same photo encoded three ways: 4:4:4 (full colour resolution) came out at 2,167,288 bytes, 4:2:2 at 1,855,445, and 4:2:0 — the default in a long list of encoders — at 1,666,969. That is 23.09% smaller than 4:4:4 (1 − 1,666,969 ÷ 2,167,288), bought by storing colour at half resolution in both directions. The pixel cost: the largest single-pixel shift rose from 46 levels (4:4:4) to 58 (4:2:0), and the share of pixels more than 10 levels off went from 2.039% to 5.470%. The setting that decides this is usually buried or absent from the interface, which makes it the one lever worth asking your tool about.

Three levers that do not touch a single pixel

Not every byte saving is a trade. These three are free, in the literal sense: the decoded image is bit-identical.

Read that last number honestly. Metadata is real, and on a small web graphic 22 KB matters, but on a photo the bytes live in the pixels, not the tags. Tools that advertise “removes metadata to save space” are solving the small problem.

Progressive 1,453,932 → 1,344,810 bytes −7.50% · 0 pixels changed Optimize flag 1,453,932 → 1,430,243 bytes −1.63% · 0 pixels changed Metadata strip 2,855,831 → 2,833,614 bytes −22,217 bytes · 0 pixels changed All three measured at the stated settings; pixel comparisons are full-frame against the decoded original. These are the only levers where “no quality loss” is a measurement rather than a slogan.
Free bytes: each lever cut file size with zero pixel change in our tests.

Resizing is the big lever, and the honest one

Every optimization page tells you to resize first. Here is what that advice is worth in bytes on the test photo, resized with a high-quality filter and re-saved at quality 85:

OutputBytes% of sourceMax shiftChanged>10 levels
Half — 1,500 × 2,000529,04817.52%13247.040%10.584%
Quarter — 750 × 1,000150,9205.00%17254.291%19.486%

Halving the dimensions cut 82.48% of the bytes — more than the entire quality ladder from 30 to 98 can offer at full size. A photo displayed 800 px wide does not need 3,000 px of width; the extra pixels are bytes you ask every visitor to download for nothing. The pixel cost is real and visible if you zoom (max shift 132 levels at half size), which is why the order matters: resize to the display width first, then compress, instead of compressing a file that was always too big.

Your call: where the image will actually be displayed — a 320 px phone slot, a 1,200 px article width, a retina screenshot at 2×. Only you know the slot. Pick the largest size the slot needs, not the largest size the camera captured.

The format trade, measured on one photo

Same photo, same encoder, quality 80 where the format is lossy. The last column is the honest one: how far the decoded pixels sit from the original.

FormatBytes% of JPEG q80Pixels vs original
JPEG q80 (baseline)1,453,932100%56.263% changed, max 68
WebP q80 (lossy)1,026,07670.6%64.229% changed, max 51
AVIF q80 (lossy)1,362,95993.7%64.196% changed, max 44, 1.853% >10 levels
PNG-8, 256 colours2,763,149190.0%64.761% changed, max 89
GIF, 256 colours3,378,730232.4%64.761% changed, max 89
WebP lossless7,659,392526.8%0 changed
PNG lossless10,643,555732.0%0 changed

On this photo, lossy WebP at q80 was 29.4% smaller than JPEG q80 with a lower maximum shift (51 vs 68 levels). AVIF was only 6.2% smaller than the JPEG, but it left just 1.853% of pixels more than 10 levels off — the cleanest image per byte in the set. The traps are the lossless modes: lossless WebP measured 28.04% smaller than lossless PNG (7,659,392 vs 10,643,555 bytes), which lines up with the published figure that lossless WebP is typically about 26% smaller than PNG (MDN, quoted as a source, not our measurement) — but both lossless modes are multiples of any lossy file. And a 256-colour GIF of a photo is 2.32× the JPEG with exactly the palette damage of PNG-8; it is the wrong tool wearing a familiar name.

Two published claims worth quoting with their sources, because our single file sits inside one range and below the other: MDN states that “lossy WebP images are on average 25–35% smaller than JPEG images of visually similar compression levels” (we measured 29.4% on this photo), and that “lossy AVIF images are around 50% smaller than JPEG images” (we measured 6.2% — treat the published figure as a best case across many images, not a promise). On browser support, MDN lists AVIF as Chrome 85, Edge 121, Opera 71, Firefox 93, and Safari 16.1; older browsers need a JPEG or PNG fallback. Both citations are documentation, not our own tests.

JPEG q80 — baseline 1,453,932 bytes WebP q80 (lossy) 1,026,076 −29.4% AVIF q80 (lossy) 1,362,959 −6.2% PNG-8, 256 colours 2,763,149 GIF, 256 colours 3,378,730 WebP lossless 7,659,392 · 0 pixels changed PNG lossless 10,643,555 · 0 pixels changed · bars to one scale
Format trade on one photo, quality 80 where lossy. WebP lossless and PNG lossless bars are to the same scale.

The second pass costs almost nothing

Feed the quality-80 output back in at the same setting and the file barely moves: 1,453,932 bytes in, 1,453,769 bytes out. A hundred and sixty-three bytes. Whatever “optimize it twice” is supposed to buy, it is not in the byte count.

The pixels move more, just not where you would see it. Against the first generation, 17.962% of pixels changed — but only 0.042% moved by more than 10 of 255 levels. Against the untouched original, the second generation is worse than the first on both counts (max shift 84 vs 68, and 8.798% vs 7.816% beyond 10 levels), and the extra damage is the small kind.

That shape — one expensive encode, then cheap ones — lines up with a repeated-save test scored by a perceptual metric: the drop lands on the first save, and saving again at the same setting barely registers. Two setups, one direction. The percentages belong to this photo; the order of costs is the part that travels.

Read it practically. A file that has already been through an optimizer gains next to nothing from a second one, in bytes, and pays a small pixel tax. A file that has not: the first pass decides how that picture looks from then on.

Your call: how many times this file has already been saved — straight off the camera, once through a chat app, re-exported from an editor three times. That history decides whether you are buying the first pass or the fourth, and only you have it.

What we measured, and what we did not test

Two files, one encoder, one Windows machine. The first is a 3,000 × 4,000 JPG, 3,019,770 bytes, no EXIF — it carries the ladder, the subsampling comparison, the three pixel-free levers, the resize table, the format table and the second-pass test. The second is a camera original, 3,936 × 2,624, 8,692,218 bytes with 22,213 bytes of EXIF, used only for the metadata strip. Encoder: Pillow 13.0.0, defaults except where a setting is named. Every pixel figure is a full-frame comparison of decoded output against the decoded original; a pixel counts as changed when any channel differs by one level or more.

Not tested, not claimed: what any third-party optimizer does to your file — those pages describe their own engines, and we ran none of them; other photos, whose exact percentages will move with detail and noise; browsers and phones, whose resampling may differ from Pillow’s; AVIF and WebP beyond the single quality point in the table; and whether the result looks good to a human eye, which no table settles.

If you just want it done

  1. Resize to the display width first. Half size cut 82.48% of the bytes on this photo. No quality slider at full size comes close.
  2. Set quality 80 to 85. 48.15% and 55.20% of the source, with 7.816% and 5.470% of pixels more than 10 levels off. Quality 95 lands at 99.11%, quality 98 at 128.62% — past 95 you pay to grow.
  3. Switch on progressive and the optimize flag. 7.50% and 1.63% smaller at quality 80, zero pixels changed.
  4. Strip metadata when the file is small or the tags are private. 22,217 bytes on a 2.8 MB export — 0.778% of the file.
  5. Go WebP only with a fallback. 29.4% smaller than JPEG here, but older browsers still need the JPEG or PNG.
  6. Do not run it twice. The second pass returned 163 fewer bytes and moved 0.042% of pixels beyond 10 levels.
HandyVale — free, in-browser, no upload

Related guides

Frequently asked questions

Does compressing a JPEG reduce image quality?

Yes, and the amount is measurable. Every save below quality 100 re-quantizes the 8×8 blocks. On our test photo, quality 85 changed 53.834% of pixels and moved 5.470% of them by more than 10 of 255 levels; quality 80 changed 56.263% and moved 7.816%. Whether that reads as damage depends on the picture — a smooth sky bands before a busy street does. A lossless PNG export of the same photo changed 0 pixels.

Is an image optimizer free?

The browser-based ones usually are, and there is a structural reason: the encoding runs on your machine, so there is no server bill to pass on. What “free” normally bounds is size — a per-file cap, a batch limit, or an account before the watermark comes off. Server-side optimizers — CDNs, APIs, site plugins — charge because they store and re-serve the file. Read the limits line, not the price tag.

Why is image optimization important?

Because bytes are time. The same scene as a 3,019,770-byte original and as a 529,048-byte half-size export arrives at different speeds, and on this test the half-size file was 82.48% smaller. It matters most for the image that paints first, since that download sits on the critical path. It also matters for mobile data and for whatever you pay per gigabyte. It does not, by itself, decide where a page ranks — speed is one input among many.

How do I optimize images for the web?

In this order: resize to the width the layout actually renders; pick a format your audience’s browsers can read; set quality 80–85; switch on progressive and the optimize flag; strip metadata if it is sensitive or the file is small. Run in that order on the test photo, the sequence ended at 1,638,783 bytes from 3,019,770 — 45.73% smaller — with 5.470% of pixels more than 10 levels off and a worst-case shift of 58.

Does saving a JPEG twice lose more quality?

The second save adds little. First pass at quality 80 against the original: 56.263% of pixels changed, 7.816% beyond 10 levels. Second pass against the first: 17.962% changed, but only 0.042% beyond 10 levels, and the file came out 163 bytes smaller. The first encode is the expensive one. After that the picture is mostly re-describing what it already is.