2026-08-05
How to compress a photo under an exact size limit — without downloading it five times to check
Most of the time nobody cares exactly how many kilobytes a photo is. Then you hit a wall that does care — an email that bounces back "message too large," a Discord upload that just refuses, a job-application form that rejects your photo with no explanation beyond a small-print size limit — and suddenly the only question that matters is: how big is this file actually going to be once I compress it? Here's why that's harder to answer than it should be, and how to actually answer it before you download anything.
The limits that actually catch people out
These aren't hypothetical. They're the real, current, stated caps on a few things people upload photos to constantly — and they vary by roughly two orders of magnitude.
| Where | Stated limit |
|---|---|
| Gmail, personal account | 25 MB per email, combined across every attachment — not 25 MB each. |
| Discord, free tier | 10 MB per file. Discord cut this from 25 MB back to 10 MB in September 2024, saying its own data showed 99% of users were already under 10 MB anyway. |
| A Korean job site's own resume-photo uploader (career.co.kr) | 1 MB — a hard, stated cap over 20× stricter than Discord's and 25× stricter than Gmail's. |
Nobody remembers all three of these off the top of their head, and there's no reason they should — the point isn't to memorize numbers, it's that "small enough" depends entirely on where the file is going, and the gap between destinations is enormous.
Why a "quality: 80%" slider doesn't answer the question
A compression tool's quality slider is an input to an encoder, not a promise about output bytes. The same 80% setting can produce a 200 KB file from a simple, flat-color graphic and a 4 MB file from a noisy, detail-heavy photo of the exact same pixel dimensions — the encoder is reacting to how much real information is in the image, not obeying a fixed ratio. And if your output format is PNG, the slider does nothing measurable at all: PNG's compression is lossless by definition, so there's no "quality" parameter for it to act on (the same fact the third post on this blog covers from the format-mechanics side). Either way, a percentage on a slider just doesn't tell you the number you actually need.
The old way: download, check, and hope
Without a way to see the output size up front, the only way to find out is to actually produce the file — download it, right-click for its properties (or Get Info on a Mac), compare that number against whatever limit you're fighting, and if it's still too big, go back, drag the quality slider down a bit more, and repeat. It works, but it's a loop, and every trip through it costs a real download and a real check.
What changed: a real re-encode, shown before you download
NearIMG's Compress tool now shows a live "≈" size estimate next to each photo — right alongside its dimensions — that updates automatically a moment after you stop adjusting the quality slider (or the output format, or a resize setting). It's not an interpolated guess dressed up as a number: it runs your file through the exact same decode→render→encode pipeline the real download uses, then reports the resulting byte count without keeping the bytes around. If you've uploaded several photos at once, the running total at the top of the page picks up the same "≈" prefix too — but only once every single photo in the batch has a real measured number, not a mix of measured and still-original sizes that would make the total misleading.
Actually hitting a target
With that in place, fitting under a specific cap stops being trial and error: drop your photo(s) into the Compress tool, drag the quality slider, and watch the "≈" number instead of the percentage. Stop once it reads comfortably under whatever you're aiming for — Discord's 10 MB, a resume portal's 1 MB, or Gmail's 25 MB combined across everything else you're attaching in the same email — and download once, because you already know what you're getting.
What this doesn't do — the honest limits
- It has nothing to say once AI upscale is turned on. That feature replaces a photo's bytes with a separate model's output before the normal compression pipeline ever runs, so the ordinary estimate can't predict it — the number disappears rather than showing a wrong guess.
- If your output format is PNG, dragging the slider won't move the number at all. That's not a bug in the estimate — it's the estimate correctly reflecting that PNG's compression is lossless and ignores a quality setting entirely. If you actually need a lever to pull for file size, converting to JPEG or WebP is what gives you one.
- The number lags your last change by roughly a third of a second, not instantly — it's a real encode running in the background, not a lookup table, so it waits for you to stop adjusting before it spends the work.
The short version
"Small enough" isn't one number — it's 1 MB for a resume photo, 10 MB for a Discord upload, 25 MB shared across a whole Gmail message, or whatever a completely different destination happens to enforce. A quality percentage was never going to tell you which side of any of those lines you'd land on. Watching the actual estimated output size while you adjust settings — measured for real, not guessed — is what finally does.