CCalclabhub

How To Resize Product Images Calculator

Resizing is one multiplication applied to every coordinate in the frame. The only decisions are which ratio to scale by and what to do about the shape that is left over.

The scale factor is the smaller of the two ratios when fitting inside, and the larger when filling and cropping. That single difference is what decides whether you see the whole product or a cropped corner of it.

Resized dimensions

2000 × 1500

3.00 megapixels · about 900 KB

The image already fits the smaller side exactly, but the box is 500 px taller than the result. Fill the gap with a background or crop the source first.

Scale factor
1.0000
Source ratio
4 : 3
Target box
2000 × 2000
Crop needed
none
Gap to fill
500 px down
Pixels kept
100%

The file size figure is an estimate at roughly the quality you picked. A real export depends on how much fine detail and noise the frame holds, so treat it as a ceiling rather than a promise.

The formula this calculator uses

scale = min(box width / source width, box height / source height) to fit inside, max(...) to fill and crop

s
The scale factor both dimensions are multiplied by
w, h
Source width and height in pixels
W, H
Target box width and height in pixels

How to check the result by hand

  1. 1

    Enter the source dimensions

    Both numbers in pixels, taken from the file itself rather than from what the camera was told to shoot. A cropped or rotated file reports the size it actually is, not the size it started as.

  2. 2

    Pick the platform target

    The target is a pair of numbers and platforms quote it as a requirement rather than a suggestion. Choosing the position on the site matters as much as choosing the platform, because the hero image and the gallery image rarely match.

  3. 3

    Choose how to handle the shape

    Fitting inside keeps everything and leaves a gap, filling crops the overflow, and stretching distorts. Make the choice before reading the numbers, because it decides which of the two ratios is even used.

  4. 4

    Read the scale factor

    One number decides everything else. Below 1 is a safe downscale in which every surviving pixel was measured, and above 1 is an upscale that invents detail which was never captured.

  5. 5

    Check the gap, the crop and the weight

    The leftover height or width is the part the box still wants, the crop is the part that will be cut, and the megapixels and byte estimate tell you whether the upload will be accepted at all.

For worked examples, common mistakes and the limits of this formula, read the full How To Resize Product Images page.