Image Tips

How to Shrink an Image to Fit a Website Upload Limit

"File exceeds maximum upload size" is vague about how far off you are. Measure first, then reduce pixels, then compress. This order gets under most limits with the least damage.

👉 Try it free: Compress JPG: hit the limit with a target size
Enter the size in KB or MB, compress and check the result before uploading.

Start by measuring the gap

"File too large" tells you nothing about how far off you are. Load the image into Image Size Checker. For each file it lists the pixel size, the file size, the megapixels and the ratio, in one line such as "4032 × 3024px · 3.8 MB · 12.19 MP · ratio 4:3." Compare the file size with the limit. A file 20 percent over the limit needs a light touch. A file ten times over needs fewer pixels.

How far over the limitFirst move
Slightly over (up to about 1.5 times)Compress with Quality % at 70 to 80
2 to 5 times overResize to around 1600 pixels on the long side, then compress
More than 5 times overResize hard, then use Target file size
PNG screenshot over the limitCheck whether JPG or WebP is accepted

Step 1: confirm what the file really is

Extensions lie. A file called photo.jpg may be a PNG, a WebP or a HEIC that someone renamed, and the format decides which tool and which limit apply. Drop the file on the Image Format Detector. It shows the extension, the type your browser declared, the format found from the first bytes of the file, and whether they match. It recognises JPEG, PNG, GIF, WebP, BMP and TIFF, so HEIC and AVIF come back as unrecognised, which is itself a clue. The full explanation is in how to tell what format an image really is.

Step 2: reduce the pixels

Pixel count drives file size more than any slider. Open Resize Image, leave the ratio on Locked and set a width that matches how the image will be displayed. Many sites show pictures well under 2000 pixels across, so a 4000-pixel original carries about four times the pixels it needs. Resizing keeps the picture in proportion and writes a name such as photo-1600x1200.jpg.

Step 3: compress to the limit

  1. Pick the compressor that matches the format: Compress JPG or Compress WebP. For PNG, Compress PNG scales the picture down because PNG has no quality setting.
  2. Use Quality % if you want control, or Target file size to give a number.
  3. Aim a little under the limit. Target mode returns the closest of up to ten attempts, which can land slightly above your number, so ask for 450 KB if the cap is 500 KB.
  4. Check the size shown in the file list before you upload.

Concrete targets and method choices for popular limits are in compressing JPG to different sizes, and the strictest common case is covered in the 100 KB guide.

Step 4: change format when it helps

If you cannot decide between formats, JPG vs PNG vs WebP sets out the trade-offs.

A worked example

A form accepts images up to 2 MB, and your phone photo is 4032 x 3024 pixels and 5.6 MB, about three times too big. The Image Size Checker shows the numbers. A resize to 2000 pixels wide, 2000 x 1500, takes the pixel count down to roughly a quarter. The file is likely well under 2 MB at this point, but you cannot be sure, so check. If it is still 2.3 MB, run Compress JPG with Target file size at 1.8 MB and keep whichever result is below the limit. The figures are illustrative, but the order is dependable: measure, resize, compress, check.

When the upload still fails

Keep the originals

Always work on copies. Every lossy save loses a little detail, and a shrunken file cannot be restored. Keep the original in a folder you do not upload from, and name outputs by purpose, for example passport-100kb.jpg. Every tool above runs in your browser, so your pictures are not uploaded while you work on them.

Frequently Asked Questions

Should I resize or compress first?

Resize first when the image has many more pixels than needed, then compress. Fewer pixels give a bigger saving than any quality slider.

How do I know the format of my image?

Use the Image Format Detector. It reads the first bytes of the file and shows whether the extension matches.

Why is a PNG so much bigger than a JPG?

PNG is lossless, so photographs and screenshots take many more bytes. Converting to JPG or WebP usually reduces the size if transparency is not needed.

Why does my compressed file still exceed the limit?

Target mode picks the closest attempt, which can sit slightly above the number. Aim 5 to 10 percent lower and check the size shown.

Does the order of steps matter?

Yes. Measure, resize, compress and only then change the format. Working from the original each time avoids stacking losses.

Are my pictures uploaded while I shrink them?

No. The tools run in your browser.