Passport and visa portals reject photos for three separate reasons and usually tell you about only one. Getting through generally means satisfying all three at once: pixel dimensions, file size, and aspect ratio.
The three requirements
Pixel dimensions. Often given in millimetres (35x45mm is the common European and Indian standard) which you have to convert. At 300 DPI, 35x45mm is roughly 413x531 pixels. US passport photos are 2x2 inches, which is 600x600 at 300 DPI.
File size. Frequently capped between 20KB and 240KB depending on the portal. Some also specify a *minimum*, which catches people who compress too hard.
Aspect ratio. This is the one that causes silent failures. If the spec is 35x45mm and your photo is square, resizing it to 413x531 will stretch the face. You need to crop to the right proportions first, then resize.
The order that works
Crop first, then resize, then compress. Doing it in any other order means redoing steps.
Why not just resize?
Because resizing changes dimensions, not proportions. Force a square photo into a 413x531 box and either the face is stretched vertically, or the tool pads it with bars, or it crops arbitrarily — usually taking the top of the head off.
The rejection message will say "photo does not meet specifications" and you will have no idea which of the three requirements failed. Cropping deliberately, before you resize, removes the guesswork.
Hitting a small file size without ruining the face
Some portals cap at 20KB, which is genuinely tight for a colour photograph. In order:
Resize down first. File size follows pixel count. A 413x531 image is already small; if you are compressing a 3000x4000 photo to 20KB, resize before compressing rather than crushing the quality of an oversized image.
Then compress. Reducing JPEG quality to 70-80% typically cuts file size substantially with no visible change on a photo this small.
Check the face after. Compression artefacts show up first around high-contrast edges — glasses frames, hairlines, the boundary between face and background. If those look blocky, you have gone too far.
If you cannot make the cap without visible damage, the source photo is probably the problem. A photo taken in poor light has more noise, and noise compresses badly. Retaking it in even daylight against a plain wall genuinely helps.
Requirements that resizing cannot fix
Worth knowing before you spend an hour on the wrong problem. Most specs also require:
No amount of resizing addresses any of those. If your photo has a patterned background or a shadow behind the head, retake it. Ten minutes with a phone against a white wall in daylight beats an hour of editing and a rejection three weeks later.
Keep the original
Save the full-resolution original before you start. Portals differ, and if this application wants 413x531 at 20KB while the next wants 600x600 at 240KB, you want to re-derive both from the original rather than upscaling an already-compressed small file. Upscaling a 20KB image never ends well.