Image Too Large to Upload? Resize a Copy with ImageMagick
Make a smaller JPEG copy with tested ImageMagick commands, compare real byte counts and avoid confusing pixel dimensions with file size.
An upload form says your image is too large. You change the resolution, try again, and get the same message. Or you turn down a quality slider and end up with fuzzy text in a file that still will not fit.
Start by checking what the form limits. Pixel dimensions, file size and file format are three separate requirements. A 1600-pixel image can still exceed a byte limit. A tiny JPEG can still have the wrong dimensions. Getting those requirements onto one line makes the next step much easier.
This guide uses ImageMagick to make a separate upload copy on your own computer. It includes commands tested on Windows, measured output sizes and a small-image check. You can use the same process for an attachment or a product image, then inspect the result before sending it.
What you need and what it costs
Download ImageMagick 7 from the official download page. It provides Windows builds, including portable archives, and options for other operating systems. Our tests used the Windows x64 Q16-HDRI portable build of version 7.1.2-36, released November 16, 2026. The examples below use PowerShell.
The software is free to use for this task, with no account or subscription required. Its source is in the official ImageMagick repository. The ImageMagick License also permits commercial use; redistributing the software carries license and attribution conditions. Check the terms if you package it into something you distribute.
Use a JPEG you own or have permission to process. Keep the original. These local file commands read and write on your computer; they do not require uploading the image to a compression website.
After installation, open a fresh PowerShell window and check:
magick -version
For a portable build, extract the archive first. You can run its executable by full path, such as & "C:\Tools\ImageMagick\magick.exe" -version, replacing that example path with your actual location. Substitute the same executable path for magick in the later commands.
1. Write down the upload requirements
Look beside the file picker or in the service's upload help. Record the accepted formats, maximum file size, maximum dimensions and any minimum dimensions. If the service requires a particular crop or aspect ratio, include that too.
For example, imagine a form that accepts JPEG, allows at most 1600 pixels on either side and caps the file at 300,000 bytes. That is an example requirement, not a claim about a particular website. We will use it to judge the test outputs below.
Put a copy named sample.jpg in a working folder. Choose fresh output names before running these commands, because a later run can replace an existing output with the same name. Inspect the input:
magick identify "sample.jpg"
Get-Item -LiteralPath "sample.jpg" | Select-Object Name,Length
identify reports the image dimensions. PowerShell's Length field gives the file size in bytes. Write down both. A file explorer's rounded size display is less useful when you are close to a strict limit.
2. Make a smaller copy while preserving its shape
For an ordinary JPEG upload copy, start with:
magick "sample.jpg" -auto-orient -resize "1600x1600>" -quality 80 "upload-q80.jpg"
ImageMagick's geometry reference describes the bounding-box behavior. The image fits within 1600 by 1600 pixels while retaining its aspect ratio. The trailing > makes this a shrink-only operation. Keep the geometry in quotes so the shell passes the whole argument to ImageMagick.
Our 2400×1600 test image became 1600×1067. A separate 600×400 input stayed 600×400 with the same resize setting. That is useful when a folder contains mixed sizes: a small image can pass through without being enlarged to the target box.
The orientation step comes before resizing. It uses the image's orientation information when present. We also checked a separate synthetic JPEG carrying a rotation tag: its displayed orientation was applied to the output pixels.

Both previews above are fitted to the page for viewing. Use the reported dimensions and byte counts to compare the files, and inspect your own output at its intended display size.
3. Measure before reducing quality again
Check the new file:
magick identify "upload-q80.jpg"
Get-Item -LiteralPath "upload-q80.jpg" | Select-Object Name,Length
Here are the actual results from our textured test card. The three outputs came from the same source JPEG. It contains generated texture, fine lines and text, rather than a camera photograph.
| File or operation | Dimensions | Size in bytes |
|---|---|---|
| Source JPEG | 2400×1600 | 1,684,737 |
| JPEG quality 80 only | 2400×1600 | 885,864 |
| Resize plus JPEG quality 80 | 1600×1067 | 286,715 |
| Resize plus JPEG quality 60 | 1600×1067 | 162,631 |
The quality-only output would fail our example form's dimension and byte requirements. The resized quality-80 output meets both numerical limits. There is no need to reduce quality further for that example if the image looks suitable.
If your output is still too large, make another copy from the original:
magick "sample.jpg" -auto-orient -resize "1600x1600>" -quality 60 "upload-q60.jpg"
Compare the two outputs at the size people will view them. Pay attention to small lettering, narrow lines and textured areas. Keep the least aggressive version that meets the requirements and looks acceptable. Going back to the original for each trial also makes the settings easier to compare.
These byte counts belong to this one image. Your photograph, screenshot or illustration can produce different sizes with identical settings. A quality value of 80 does not promise a file that is 80% of the original size.

4. Treat PNG, transparency and metadata separately
Changing the output filename to .jpg changes the format. Before doing that, ask whether the source needs transparency or especially crisp text. JPEG is a poor fit for an image that must retain a transparent background. Keep an appropriate format accepted by the destination and inspect the result.
ImageMagick's option reference explains that PNG quality controls compression and filtering. It does not introduce the same lossy quality tradeoff as JPEG. We encoded the same test PNG at quality 20 and quality 80: the files measured 4,599,300 and 5,687,103 bytes, while their decoded RGB pixels matched the input exactly. Moving that number down did not remove visible detail in this test.
Metadata is another decision. The optional -strip operation removes profiles and comments, including color profiles. If you choose to use it, apply orientation first. Avoid blanket stripping when color management matters, and keep the original for later editing. The main upload command above leaves stripping out so it is a deliberate choice.
Removing metadata also leaves visible names, faces, addresses and other information inside the picture untouched. Review the image itself before sharing it.
A short routine for the next upload
Save the successful command alongside the destination's requirements. When the next file arrives, follow the same sequence:
- Confirm the accepted format, dimensions and byte limit.
- Read the original dimensions and file size.
- Write a separate output with an unused filename.
- Measure the output, open it and inspect the important detail.
- Submit it only after those checks pass.
If a form still rejects a file that appears to fit, copy its exact error and revisit the requirements. Check minimum dimensions, required crop and format as well as the maximum size. Further compression can make the image worse without addressing the actual reason for rejection.
Keep the original and your accepted copy together with clear names. A version suitable for a small web upload may be unsuitable for printing or a later crop. The original gives you room to make a different copy when the next destination has different needs.
Tested November 30, 2026, with ImageMagick 7.1.2-36 on Windows build 26200 using generated test images. Dimensions, byte counts, unchanged source hash, PNG pixel equality and the small-image check were verified locally. No upload service, camera-photo collection or color-critical print workflow was tested.