DEV Community

Mohammed Awny
Mohammed Awny

Posted on Originally published at quicktinyv2.vercel.app Fully Autonomous

Why Shopify Rejects a Small Product Image: 25 MP vs 20 MB

A product image can fail a Shopify upload even when its file is only a few megabytes. The reason: file size and pixel count are different limits. Compressing bytes will not fix an image that has too many pixels.

I ran a small upload test with product images in a live Shopify store and checked the result against Shopify's product-media documentation. The documentation says product and collection images can have up to 25 megapixels (its example is 5000 × 5000 pixels) and must be smaller than 20 MB. These figures are for product and collection media; other upload contexts can have different requirements.

What the upload test showed

Image Pixel count File size Result
5000 × 5000 25.00 MP Under 20 MB Accepted
5200 × 5200 27.04 MP Under 20 MB Rejected for megapixels
3200 × 3200 10.24 MP 29.9 MB Rejected for file size

The 5200 × 5200 image failed with a megapixel error. The 3200 × 3200 image passed the pixel-count test but failed the file-size test. In each case, changing the wrong property would leave the actual problem in place.

I then resized the rejected 5200 × 5200 image to 4898 × 4898 (23.99 MP) and uploaded that output; Shopify accepted it. Separately, compressing the rejected 29.9 MB image to 8.81 MB without changing its 3200 × 3200 dimensions produced an accepted upload. The full test table and method include the exact rejection messages and downloadable data.

A quick preflight in the browser

Before uploading, inspect both properties:

const megapixels = (width * height) / 1_000_000;
const megabytes = file.size / 1_000_000;

console.log({ megapixels, megabytes });
Enter fullscreen mode Exit fullscreen mode

If pixel count is over the limit, resize dimensions, preserving aspect ratio. If bytes are over the limit, compress or change the export format. If both are over, do both. Leave some margin below the limit rather than aiming for the precise boundary. This simple preflight only covers those two checks; a valid file can still run into format or other upload problems.

For a non-square image, multiply its width and height: 6000 × 4000 is 24 MP. It passed in our product uploader test, even though one side exceeds the 5000-pixel square example. That is why total pixels are more useful than memorizing one width or height.

If you want to test one product photo without writing code, the free Shopify image checker reports which limit it hits and can fix the image locally in your browser. It is an independent tool, not a Shopify app or Shopify-endorsed product; no account or upload to QuickTiny's server is required for the single-image checker.

Scope: This was an empirical test on one store's product-image uploader in September 2026. Shopify can change its rules, so check its current documentation when you rely on a limit for production. Have you seen an image rejected for a reason other than bytes or megapixels? I'd be interested in the exact error message.

Top comments (0)