Blog

Why "compress image to 50 KB" fails on most sites, and how to do it right

2026-10-19 · 6 min read

Search for compress image to 50 KB and you get pages that promise an exact size and deliver a 61 KB file. The portal rejects it, the applicant tries a lower setting, gets 23 KB of mush, and gives up. The reason is simple: most tools treat compression as a quality slider, when an exact size limit is a search problem.

Quality is not size

JPEG quality 70 produces a different file size for every image. A photo of a plain wall at quality 70 might be 18 KB; a photo of a crowd at the same setting might be 180 KB. A fixed setting therefore cannot promise a size. The only honest way to hit a limit is to encode, measure, and adjust.

What a correct compressor does

  1. Encode at the highest quality that could possibly fit and measure the result. If it is under the limit, stop: you lose nothing.
  2. Search quality downwards (a binary search needs about six encodes) until the file is at or just under the target. Every candidate is measured; nothing is assumed.
  3. Only then reduce dimensions. Below a certain quality the picture falls apart into blocks; it is better to scale the image down by 10 percent and raise the quality again. The search repeats at the new size.
  4. Never return a larger file than the input, and never return a file above the limit silently. If the target is impossible (a 2 KB limit for a 20-megapixel photo), say so.

This is what every ShrinkLab compress preset does, in a Web Worker on your device, which is why a 5 MB phone photo reaches 50 KB in about a second and the number you see is the number you download.

Why "resize first" is folk wisdom with a kernel of truth

Forum advice says to resize the image before compressing. It is right for the wrong reason: downscaling removes detail that JPEG would otherwise spend bytes on, so a smaller image reaches the limit at a higher quality. A good compressor does this automatically and only as much as necessary, keeping the framing and the aspect ratio.

The formats matter

At the same visual quality WebP is 25 to 35 percent smaller than JPEG, and PNG is the wrong choice for photos entirely (it is lossless and large). For a form that insists on JPEG, keep JPEG; for the web, WebP wins; for a logo with transparency, PNG or WebP. ShrinkLab lets you pick the output per run and applies the same search to any of them.

Minimum sizes exist too

Some exam portals want 20 to 50 KB, and a well-compressed photo can land at 15 KB. For those cases the increase-size tool pads the file up to the minimum without touching a pixel. The honest number cuts both ways.

Try it: compress an image to 50 KB, then check the result with the before/after slider.

All tools

Esc
Pro

ShrinkLab Pro

Support independent, privacy-first tools and get the smoothest experience.