
Key takeaways
- Forms reject images for four separate reasons: file size in KB, pixel dimensions, file format and DPI or print size, so identify which rule failed first.
- Some official limits have a minimum too: the UK digital passport photo must be 50 KB to 10 MB and at least 600 by 750 pixels.
- Set the compressor about 5% under the limit, because 100 KB at 1,024 bytes per KB is 102,400 bytes and fails a 100,000-byte cap.
- Work in order: crop to the required shape, resize to the exact pixels with the aspect ratio locked, then compress to a target size last.
When a government form rejects your photo, the file size is only one of four possible reasons. The others are the pixel dimensions, the file format and, now and then, the DPI. Find out which rule failed before you change anything. Then crop, resize and compress in that order, and aim a little under the size limit rather than right at it.
Our earlier guide on how to compress an image to 100KB covers the quality settings that get a photo under a cap. This one is about reading the form's rules correctly, so you fix the right thing the first time.
The four reasons a form rejects an image
| Rule | What it measures | Typical wording | How to fix it |
|---|---|---|---|
| File size | Bytes on disk | "Max 100 KB", "between 20 KB and 50 KB" | Compress |
| Pixel dimensions | Width and height in pixels | "600 x 600 pixels", "at least 600 pixels wide" | Crop and resize |
| Format | File type | "JPG/JPEG only" | Convert |
| DPI or print size | Pixels per inch, or inches and mm | "300 DPI", "2 x 2 inches", "35 x 45 mm" | Work out the pixels needed |
Many forms check more than one of these. Fixing the file size does nothing if the real problem is the pixel size, and that is the most common reason people compress the same photo five times and still get rejected.
Read the limit as a range, not a ceiling
Some official limits have a floor as well as a ceiling. Here are three examples from official pages:
| Upload | Rules on the official page |
|---|---|
| UK passport digital photo (gov.uk) | At least 600 pixels wide and 750 pixels tall; 50 KB to 10 MB |
| US passport online renewal (travel.state.gov) | JPG, JPEG, PNG, HEIC or HEIF; 54 KB to 10 MB |
| US visa digital image (travel.state.gov) | Square, 600 x 600 to 1200 x 1200 pixels; JPEG; 240 kB or less |
Two of the three have a minimum file size. Squeeze a photo down to 30 KB and those forms reject it for being too small. Always read both numbers before you start compressing. These rules change, so check the official page on the day you apply.
Why to aim slightly below the limit
"100 KB" does not mean the same number of bytes everywhere. Some systems count a kilobyte as 1,000 bytes and others as 1,024. Our Image Compressor uses 1 KB = 1,024 bytes.
Here is what that means for a 100 KB cap:
| Target you set in the compressor | Bytes in the file | Passes a 100,000-byte limit? |
|---|---|---|
| 100 KB | 102,400 | No |
| 97 KB | 99,328 | Yes, just |
| 95 KB | 97,280 | Yes |
So if the form says 100 KB, set the target to about 95 KB. For a 240 kB limit, a target of 230 KB gives 235,520 bytes, which is under 240,000. A few percent of headroom costs nothing you can see, and it removes the guesswork.
The order: crop, resize, then compress
Each step works on a different rule from the table above, and doing them out of order makes the result worse.
- Crop first. If the form wants a square or a set shape, crop to that shape before anything else. The Image Cropper has Free, Square, 16:9, 4:3 and 3:2 modes, and shows the crop size in the photo's real pixels. Its presets are landscape only, so for a portrait shape such as 35 x 45 mm use Free mode and watch the readout. It saves the crop as a JPEG.
- Resize second. Set the exact pixel size in the Image Resizer. Keep "Keep aspect ratio" ticked. If the numbers do not fit the shape you cropped, go back and crop again rather than unticking it, because that stretches faces.
- Compress last. Open the Image Compressor, switch to "Target file size" and type your figure in KB. It searches for the highest quality that fits. It never changes the pixel dimensions, so the size you set in step 2 stays put.
Compressing first and resizing afterwards throws the work away. Resizing re-encodes the image, so the file size changes again.
One format trap: the compressor saves PNG, GIF and WebP uploads as WebP (or JPEG in Safari, which cannot save WebP), and JPEG uploads stay JPEG. If the form says JPG only, convert with PNG to JPG before compressing.
What DPI actually means on a form
DPI (dots per inch) links pixels to a printed size. On its own, it does not change how many pixels a photo has. The useful part is the arithmetic:
Pixels needed = inches x DPI
The US State Department's visa photo page says a 2 x 2 inch photo should be scanned at 300 pixels per inch, which gives 2 x 300 = 600 pixels on each side. For a 35 x 45 mm photo at 300 DPI, divide by 25.4 to convert millimeters to inches: 35 / 25.4 x 300 = about 413 pixels wide, and 45 / 25.4 x 300 = about 531 pixels tall.
If a form gives a DPI and a print size, convert to pixels and resize to that. If it insists on a DPI value stored inside the file, that is a metadata field. Our browser tools do not write it, so you would need a desktop photo editor for that one setting.
Quick fixes by error message
| Error you see | Likely rule | Fix |
|---|---|---|
| "File too large" | File size | Target about 5% under the limit |
| "File too small" | Minimum file size | Compress less, or resize larger |
| "Invalid dimensions" | Pixel size | Crop to shape, then resize |
| "Unsupported file type" | Format | Convert to JPG; check it is not HEIC or WebP |
| "Image must be 300 DPI" | Print size | Work out inches x 300 and resize |
Keep the original photo untouched in a separate folder. If a form rejects your edit, start again from the original rather than compressing an already compressed file.
Frequently asked questions
File size is only one rule. Forms can also check the pixel width and height, the file format and sometimes the DPI or print size. If the error mentions dimensions or file type, compressing again will not help. Crop and resize to the stated pixels, convert to JPG if required, and only then compress.
Both are in use. Some systems count 1,000 bytes and others 1,024. A file of 100 KB measured at 1,024 bytes is 102,400 bytes, which fails a 100,000-byte limit. Setting your target about 5% below the stated limit, such as 95 KB for a 100 KB cap, passes under either definition.
Crop first to get the required shape, resize second to reach the exact pixel dimensions, and compress last to hit the file size. Resizing re-encodes the image, so compressing before resizing wastes the effort and changes the file size again. Keeping the aspect ratio locked while resizing stops faces from stretching.
DPI turns a print size into pixels: multiply the inches by the DPI. A 2 by 2 inch photo at 300 DPI is 600 by 600 pixels. For millimeters, divide by 25.4 first, so 35 by 45 mm at 300 DPI is about 413 by 531 pixels. Resize the image to those numbers.
Yes. Some official forms set a minimum file size or minimum pixel dimensions. The UK digital passport photo must be at least 50 KB and 600 by 750 pixels, and the US online passport renewal photo must be at least 54 KB. Over-compressing or shrinking too far gets rejected just like an oversized file.
