How to compress a photo for a visa application

Visa portals specify photo sizes in kilobytes and rarely explain how to hit them. Here are the actual limits by country, and the order of operations that works.

Somewhere in every online visa application there is a sentence like this: “Upload a recent photograph in JPEG format. File size must not exceed 240 KB. Dimensions must be 600 × 600 pixels.”

Then nothing. No guidance on how, no tool, no explanation of what happens if you are 10 KB over. What happens is the upload is rejected, usually with a generic error, sometimes after you have filled in forty other fields.

This is a guide to getting it right the first time.

The order of operations

This is the part almost everyone gets wrong, and it costs quality.

Crop first. Resize second. Compress last.

The reason is that each step throws away information, and doing them in the wrong order means throwing away information twice.

If you compress first and then resize, the compressor spent its budget on pixels you are about to delete, and the resizer has to work from an image that already has compression artefacts in it — which it then smooths into a slightly mushy result. If you resize first, the compressor works on exactly the pixels that will survive, and spends its whole budget on them.

Cropping goes first for the same reason, one level up: every pixel you keep costs bytes, so removing the ones you do not need makes everything after it easier.

The actual limits, by country

These change, so check the current official page before you submit — but this is where things stood as this was written.

Programme Dimensions Format File size
US Diversity Visa (DV Lottery) 600 × 600 px exactly JPEG only ≤ 240 KB
US visa (DS-160) 600 × 600 to 1200 × 1200 px JPEG ≤ 240 KB
UK visa (online) at least 600 × 750 px JPEG 50 KB – 10 MB
Schengen (varies by consulate) 35 × 45 mm printed JPEG typically ≤ 500 KB
India passport (Seva) 4.5 × 3.5 cm JPEG 10 – 20 KB
China visa 354 × 472 px JPEG 40 – 120 KB
Singapore ICA 400 × 514 px JPEG ≤ 60 KB

Two patterns worth noticing. First, several of these specify a minimum as well as a maximum — the UK wants at least 50 KB, on the reasoning that a very small file implies a very low-resolution photograph. Aiming for the middle of a range is safer than aiming for the bottom.

Second, “JPEG only” means JPEG. Not PNG renamed to .jpg, which some validators detect and reject.

Getting the photograph right first

No amount of compression rescues a bad photograph, and most rejections are about the photograph rather than the file.

Stand about half a metre from a plain, light, evenly lit wall. Have the camera roughly 1.5 metres away — an arm’s-length selfie is close enough to distort facial proportions in a way reviewers notice. Face the camera squarely with a neutral expression and your mouth closed. Both eyes open, clearly visible, no glasses. Use soft frontal light; an overcast window is close to ideal and an overhead ceiling light is close to the worst, because it drops shadows into your eye sockets.

Take ten. Pick the best one afterwards.

Doing it

The passport photo maker does the whole sequence in one place: it crops to the right aspect ratio with head-height and eye-line guides for the specific country, resizes to the exact pixel dimensions, and — where the authority publishes a byte limit — compresses to stay under it automatically.

If you would rather do the steps separately, or your requirement is not one of the presets:

  1. Crop to the required aspect ratio.
  2. Resize to the exact pixel dimensions.
  3. Compress to the target size — change the number to whatever your form asked for.

All three run in your browser. That is worth something here specifically: the file in question is a photograph of your face, being attached to an identity document, and the alternative is uploading it to a free converter you found through a search engine.

How the size target is actually hit

The interesting problem is: given a fixed byte budget, what is the best-looking image that fits?

JPEG has a quality parameter from 1 to 100, and the relationship between quality and file size is not linear and not predictable in advance — it depends on the content of the image. A photograph of a plain wall compresses far better than a photograph of a forest.

So the only reliable method is to search. Encode at high quality, measure; encode at low quality, measure; then binary-search between them, measuring each time, until you find the highest quality that still fits. That takes six to nine real encodes and finishes in well under a second on a modern laptop.

If even the lowest acceptable quality overshoots, the resolution has to come down — but only then. Keeping pixels is almost always better than keeping precision: a 600-pixel image at quality 50 looks better than a 300-pixel image at quality 95.

Common mistakes

Screenshotting the photo to make it smaller. This re-encodes at whatever quality your OS chooses and usually changes the dimensions in a way you did not intend.

Using a scanner on a printed photo. Scanning a print introduces paper texture, colour shifts and moiré. Use the original digital file.

Emailing the photo to yourself. Many mail clients silently downscale attached images. What arrives is not what you sent.

Reusing last year’s photo. Most programmes require a photograph taken within the last six months, and the DV Lottery explicitly disqualifies entries that reuse a previous entry’s photograph.

Being exactly at the limit. If the form says 240 KB, aim for around 230. Some validators compare against 240,000 bytes rather than 245,760, and the difference has failed real applications.