PhotoSizeCheck

Image Dimensions vs File Size

By PhotoSizeCheck · Updated 2026-11-30

Dimensions describe width and height in pixels. File size describes how much storage the encoded image uses. They are related, but one does not decide the other.

The short answer

  • Dimensions (for example 1200 × 800 px) say how many pixels the picture has. They decide how much detail it can show and how big it appears on screen.
  • File size (for example 36 KB) says how many bytes the file takes up. It depends on the dimensions, but also on the format, the compression settings and what the picture shows.

An experiment: three images, same dimensions

We made three test images that are all exactly 1200 × 800 pixels (960,000 pixels each), then measured the files. You can download each one and check it in our image size checker.

Flat graphic (PNG): Three areas of solid colour
Flat graphic (PNG)
Smooth gradient (JPEG, quality 85): Colour changing gradually across the frame
Smooth gradient (JPEG, quality 85)
Random fine detail (JPEG, quality 85): Every pixel a random colour: the worst case for compression
Random fine detail (JPEG, quality 85)
ImageDimensionsFormatFile size% of uncompressed
Three areas of solid colour1200 × 800PNG5.1 KB
5,064 bytes
0.2%
Colour changing gradually across the frame1200 × 800JPEG36.0 KB
35,950 bytes
1.2%
Every pixel a random colour: the worst case for compression1200 × 800JPEG726.2 KB
726,177 bytes
25.2%

Method: images generated with Python Pillow 10.2 (script scripts/make-fixtures.py in our repository; random detail uses a fixed seed so the result can be reproduced). "Uncompressed" = 1200 × 800× 3 bytes = 2,880,000 bytes, the size of the raw 24-bit colour data.

The largest file is about 143 times the size of the smallest, with exactly the same dimensions.

Why the sizes differ

1. What the picture shows

Compression works by finding patterns. A flat area of one colour can be stored almost as "this colour, repeated many times". A smooth gradient is predictable too. Random fine detail has no pattern to exploit, so every pixel costs bytes. Real photos sit in between: a clear blue sky compresses well, while grass, gravel or fabric texture does not.

2. The format

PNG is lossless: it keeps every pixel exactly, which is ideal for graphics and screenshots with flat colour but makes photos large. JPEG is lossy: it throws away detail the eye is unlikely to notice, which makes photos much smaller. WebP and AVIF can do either, usually at a smaller size than JPEG or PNG.

3. The quality setting

A lossy format saved at quality 95 keeps more detail, and more bytes, than the same image at quality 70. Resaving a photo can therefore change its file size without touching its dimensions.

4. Metadata

Camera details, GPS location, colour profiles and embedded thumbnails all add bytes, sometimes tens of kilobytes, without changing a single pixel.

What this means in practice

  • An upload form says "maximum 200 KB". That is a file size limit. You can meet it by lowering the JPEG quality, by reducing the dimensions, or both.
  • A form says "at least 600 × 600 pixels". That is a dimensions requirement. Compressing the file harder will not help; you need an image with enough pixels.
  • Same dimensions, different sizes is normal, as the experiment shows. Always check both numbers.

KB or KiB?

1 KB is 1,000 bytes and 1 KiB is 1,024 bytes. Windows File Explorer labels KiB values as "KB", so a file Windows calls 195 KB is about 200 KB in decimal units. When a limit is tight, compare the exact byte count, which our checker always shows.

Related: How to check image resolution · Check an image now