Image Dimensions vs File Size: Fix a Rejected Upload
Check which kind of “size” the form means
Image dimensions count the pixels across and down. File size counts the bytes stored on disk. An upload can satisfy one condition and fail another, so check each requirement separately.
For example, “no wider than 1,200 px” and “under 500 KB” are two different tests. Those numbers are illustrative, not the requirements of a particular service. A form may also restrict the format or aspect ratio.
| Requirement | What it controls | What to inspect |
|---|---|---|
| Width and height in px | The pixel grid | Actual width and height of the saved file |
| A KB or MB limit | Stored data size | The finished file’s byte count |
| JPG, PNG, or another format | Accepted encoding | The actual saved format |
| A required aspect ratio | Image shape | Cropping, padding, and distortion |
A measured example: equal dimensions, different bytes
On October 30, 2026, we created one synthetic 1,200 × 800 RGB image and saved JPEG variants with Pillow 12.3.0. A quality setting of 90 produced 209,398 bytes. Keeping the same dimensions and using quality 45 produced 59,129 bytes.
Resizing the original to 600 × 400 with LANCZOS and saving at quality 90 produced 41,568 bytes. Each output was reopened to confirm its JPEG format and dimensions. The experiment fixed subsampling at 4:2:0, enabled optimize, and disabled progressive saving.
The figure uses decimal kB: 1 kB equals 1,000 bytes. Exact byte counts are included because an application may label or round storage units differently.
| Output | Dimensions | Pillow quality | Exact bytes |
|---|---|---|---|
| A | 1,200 × 800 | 90 | 209,398 |
| B | 1,200 × 800 | 45 | 59,129 |
| C | 600 × 400 | 90 | 41,568 |

What this comparison does—and does not—show
A and B demonstrate a change in bytes without a change in pixel dimensions. C changes the dimensions as well. This is why a pixel limit alone cannot tell you whether a file will pass an upload-size check.
JPEG is lossy: retaining the pixel grid does not mean retaining every original pixel value. Lower settings may remove detail or introduce artifacts, so do not select a number solely because its file is smaller.
These are local encoder tests on an artificial image, not measurements from PowerToys or camera photographs. The quality values belong to this encoder and are not interchangeable promises across apps. No single setting guarantees a target KB size.
Fit, Fill, or Stretch? Check the shape as well
When changing dimensions, decide whether the whole image must remain visible. PowerToys documents three approaches: Fit preserves the full image proportionally, Fill scales proportionally to cover a target and can crop, and Stretch can alter proportions.
The diagram uses a 900 × 600 source and a 600 × 600 target box. Fit produces a 600 × 400 image in this example. The unfilled area inside the dotted target is a comparison aid, not padding added to the output file.

A practical upload-check workflow
Work on a copy so you can return to the source if a result loses too much detail. If you use PowerToys, Microsoft documents selecting images in File Explorer and choosing Resize with Image Resizer from the right-click menu.
- Write down the destination’s actual pixel, file-size, format, and aspect-ratio requirements.
- Inspect a copy of the source. Record its current dimensions, format, and bytes before changing anything.
- Change only what the requirements call for. When resizing, choose the required pixel bounds and an appropriate Fit, Fill, or Stretch behavior.
- Save a separate output and measure it again. If dimensions already match but bytes are too high, review a supported export format or JPEG-quality control in your chosen tool. Do not assume resizing alone guarantees the byte limit.
- Open the final file and check faces, text, edges, and cropping. Submit only after both the numeric conditions and readability are acceptable.

Two mistakes worth avoiding
Changing a filename from .png to .jpg does not convert the image data. Use a supported save or export operation and check the resulting format.
PowerToys’ fallback encoder is for inputs that cannot be saved in their original format; Microsoft distinguishes it from a general format-conversion tool. Do not treat that setting as a universal JPG/PNG converter.
Keep the source, make one controlled change, and inspect the actual output. If no acceptable result meets the limit, revisit the permitted format or contact the destination rather than degrading the image repeatedly.
Sources and verification
- Microsoft Learn: PowerToys Image Resizer (checked 2026-10-30)
- Pillow: JPEG saving options (checked 2026-10-30)
If an upload accepts more than one format, compare the result as well as the byte count. Our PNG versus JPEG screenshot test shows how small text can change when the format and compression change.
Comments
Post a Comment