Why file size limits are so hard to hit
Almost every upload form states its limit in kilobytes, and almost every image tool gives you a quality percentage. Those two things are not the same, and there is no fixed relationship between them. A photo of a plain wall at 60% quality might be 30 KB; a photo of a forest at the same 60% might be 400 KB. Quality controls how much detail the encoder throws away, not how many bytes come out the other end.
That is why the usual routine is so frustrating: export, check the size, it is too big, drag the slider down, export again, now it is 8 KB and unrecognisable, drag it back up, and so on. You are performing a manual binary search, badly.
This tool does that search properly. It encodes your image repeatedly at different settings, measures the actual bytes each time, and converges on the highest quality that still fits your limit. The result is not just under the target, it is close to it, which is exactly what you want, because every unused kilobyte is detail you gave away for nothing.
The minimum-size trap
Almost nobody expects this one. A number of official portals reject files for being too small, on the reasoning that a tiny file means a poor scan:
- US online passport renewal refuses anything under 54 KB.
- China's COVA visa system requires 40–120 KB, a window, not a ceiling.
- Indian recruitment boards (SSC, IBPS, RRB) typically want photos at 20–50 KB and signatures at 10–20 KB.
If you have been compressing as hard as possible to be safe, you may have been failing for the opposite reason to the one you assumed. Set a minimum size in the tool above and the output will land inside the window.
When an image is small and simple enough that it compresses below the floor even at maximum quality, we close the gap by adding a metadata comment block to the file. Every decoder skips those blocks, so the picture is byte-for-byte unchanged, the container just becomes the size the portal expects.
Crop and resize before you compress
This is the single biggest improvement available, and most people skip it. Compression works by discarding detail, so the more pixels you ask it to fit into a fixed budget, the more it has to discard from each one.
| Starting image | Target | Result |
|---|---|---|
| 4000 × 3000 px photo | 20 KB | Heavy blocking, face barely recognisable |
| Same photo resized to 600 × 450 px | 20 KB | Clean and sharp at the size it will be viewed |
Set a longest side in the options above, or use the resize tool first if you need exact dimensions. For a photo that will be displayed in a small box on a government form, anything beyond about 800 px is wasted.
Choosing a format
The format matters more than most compression settings, because JPEG and PNG solve fundamentally different problems.
- JPEG, use for photographs and anything with people or natural scenes. It has a quality dial, so it can be tuned to hit a target. Almost every official portal expects JPEG.
- PNG, lossless, so there is no quality dial and the only way to shrink it is to reduce dimensions. Correct for screenshots, logos, line drawings and anything needing transparency; a poor choice for a passport photo with a tight size limit.
- WebP, noticeably smaller than JPEG at the same visual quality, and excellent for websites. Do not use it for official uploads; most portals will not accept it.
If a form says "JPG only" and your file came off an iPhone, it is probably HEIC rather than JPEG even if it looks like a photo. Use the format converter to check and convert.
What compression removes besides detail
Because the image is redrawn from its pixels, the output carries no EXIF metadata. In practice that means the GPS coordinates, camera model, and timestamp embedded by your phone are all dropped. For anything you are sending to a third party, that is a privacy improvement rather than a loss, a photo taken at home usually has your home address written into it.
The one piece of metadata we deliberately write back is print resolution (DPI), and only when a spec calls for it, because a photo sized in millimetres is meaningless without it.
A practical routine
- Find the exact requirement, dimensions, format, and both size limits if there are two.
- Crop to the required shape first, so nothing important is lost later.
- Resize to the required pixel dimensions, or cap the longest side if none are specified.
- Compress to just under the maximum, with the minimum set if the portal has one.
- Check the downloaded file before uploading, the size is shown in your file manager.
If your requirement is a common one, the requirements database already has the exact numbers and will apply all of them in a single step.