What to do when an image is too big to upload

There are few experiences more irritating than filling in a form, browsing for a photo, and being told the file is too large — with no indication of how large it should be, or what to do about it. This guide covers what the limits are actually for, which of the three available levers to pull first, and rough numbers for the places images usually have to go.

Open the compressor →

Give it a limit and it finds the best quality that fits. Runs in your browser, nothing uploaded.

Why the limit exists at all

It is rarely arbitrary. Storage, bandwidth and transfer cost money, and a form that accepts a 40 MB photograph from every applicant is paying for that in all three. Mobile uploads on poor connections are also a genuine constraint: a file that takes four minutes to upload will usually be abandoned, which costs the receiving organisation a completed application.

The result is that limits cluster around a few round numbers, and knowing which cluster you are up against tells you most of what you need.

Three levers, and the order to pull them in

Making a file smaller is not one operation, it is three, and they are not interchangeable. Each costs you something different.

LeverWhat it costsWhen to reach for it
1. CropLoses part of the pictureWhen the frame contains more than the subject — an over-wide shot, a lot of empty background, a screenshot with a toolbar in it
2. Reduce dimensionsLoses the ability to zoomAlmost always the right second step. Still looks clean, and cuts the file dramatically
3. Lower the quality settingIntroduces visible artefactsLast. Gets you the final percentage, and damages the image fastest once you push it

The instinct is to jump straight to step three, because a quality slider is the most visible control in most image editors. That is backwards. Cropping and resizing both remove information that was not needed; lowering quality removes information that was needed, and it does so in the most visible way possible — blocky edges, banding in skies, mush where text used to be.

A useful mental rule: a clean 1200-pixel image at high quality almost always looks better, and is smaller, than a mangled 3000-pixel image at low quality.

Rough targets by destination

These are practical ranges rather than official specifications, and the right column matters as much as the middle one — choosing the format often does more work than any amount of compressing.

Where it is goingTarget sizeUseful dimensionsFormat
Web page hero image150–250 KBup to 1920 wideWebP, JPEG fallback
In-article photograph60–150 KB800–1200 wideWebP or JPEG
Product listing main image150–400 KB1600–2000 squareJPEG
Product thumbnail20–60 KB400–600 squareWebP or JPEG
Avatar or profile photo15–50 KB200–400 squareJPEG or WebP
Application portal photo100–500 KB1000–1600JPEG
Email attachmentunder 5 MB each1600–2400JPEG
Slide or presentation image200–500 KB1920 wideJPEG
Print at 10 × 15 cm1–3 MB1800 × 1200 (300 dpi)JPEG, quality 92+
Phone wallpaper300–800 KB1170 × 2532JPEG

Why two similar-looking photos differ tenfold in size

File size is not a function of how important or how pretty an image is. It is a function of how much detail and randomness the encoder has to preserve, and that varies enormously between pictures that look comparable to a human.

This is why a target size that is comfortable for one photo can be brutal for another, and why a tool that searches for the best fitting quality is more useful than a fixed quality number. The same quality value produces very different files from different pictures.

The round-number trap

A file that reports as "2.00 MB" in one place can be rejected by a form that says the limit is 2 MB. Three reasons, and they compound:

  1. Two meanings of KB and MB. Storage is usually counted in powers of 1024, marketing in powers of 1000. A 2 MiB file is about 2.1 MB. If a system enforces its limit in one unit and displays it in the other, the round number is not the same number.
  2. Disk usage versus actual size. File managers sometimes show the rounded-up allocation rather than the byte count, which can differ by several kilobytes.
  3. Multipart upload overhead. Forms that encode a file into a request body add boundary headers, so the bytes received are slightly more than the bytes on disk.

The practical consequence: aim for about 90% of a stated limit, not 100%. A 1.8 MB file passes a 2 MB limit everywhere, on every filesystem, in every unit convention. A file that is 1.99 MB is a coin flip.

Choose the format before you compress

Format is the highest-leverage decision, and it is usually made by accident because the camera or the screenshot tool picked one.

A checklist before you hit upload

  1. Check the actual limit and its unit before preparing anything, and aim for 90% of it.
  2. Look at the image and ask what can be cropped. Screenshots often carry a toolbar and a lot of whitespace.
  3. Decide the dimensions the destination actually needs. A form that displays a photo at 400 pixels does not need a 4000-pixel file.
  4. Pick the format by content type — photograph or text/diagram.
  5. Only then compress, and prefer a target-size approach over a quality slider, since the same quality number means different sizes on different images.
  6. Keep the original. Export the compressed version as a new file; requirements change and re-compressing a compressed file is a one-way loss.

Questions

Can I just lower the resolution and keep quality high?

Usually yes, and it is the better trade. Reducing dimensions removes detail that nobody was going to look at on the target device; reducing quality destroys the detail that remains. A 1200-pixel image at quality 90 typically looks better than a 2400-pixel image at quality 40, and is smaller.

Why does my file grow when I resize it?

Because resizing re-encodes. If the source was an already-optimised JPEG and the new size is saved at a higher quality setting, or as PNG, the output can be larger. Always re-export from the original at the quality you intend, rather than editing an already compressed copy.

Does compressing remove the location data from my photo?

Re-encoding through a canvas drops EXIF, which includes GPS coordinates. That is usually a benefit for anything uploaded publicly. If you need the original metadata, keep the source file — a compressor exports a new file and never modifies the original.

What is the smallest a photo can reasonably be?

For a full-screen photograph, around 100 KB is roughly the floor before visible damage. Below that you are better off reducing dimensions and accepting a smaller display size than keeping the dimensions and letting the encoder destroy the image. For a thumbnail, 15–30 KB is entirely normal.

Should I compress before or after removing the background?

Remove the background first if you need one removed, then resize, then compress. Each step in that order reduces the work the next one has to do — and keep transparency until the resize is finished, since baking a background early can bake a fringe in with it.

Related