The four factors
How heavy an image file becomes depends on four things — and only the first is obvious:
- Pixel count — width × height. More pixels = potentially more data.
- Format — JPG, PNG, WebP, AVIF compress with different efficiency.
- Compression strength — the quality slider in lossy formats.
- Image content — the most underrated factor.
The raw calculation
Without any compression, size is simple to compute: each pixel needs three bytes (one each for red, green, blue). So:
width × height × 3 = uncompressed size in bytes
A 4000 × 3000 photo is roughly 36 megabytes raw. But no JPG is that big — because compression steps in exactly here. The same photo as a JPG (quality 80) often lands at 1 to 3 megabytes. The factor between raw and compressed is enormous, and that's precisely what image compression does.
Why content matters so much
The most interesting factor: two photos of the same size can weigh very differently — because compression thrives on repetition and predictability. It groups together what's similar:
- Small results: a blue sky, a smooth wall, a calm color field — lots of similarity, little real information, strong compression.
- Stays big: leaves, gravel, a crowd, a detailed pattern — barely any repetition, lots of information, little compression gain.
That's why a portrait against a blurred background is smaller than a same-size photo of a forest floor. Content is part of the equation — not just the pixel count.
Format differences
For the same content and similar quality, the rough order from small to large is: AVIF → WebP → JPG for photos; for graphics with few colors, an indexed PNG or WebP is smallest. But there's no universally "smallest" format — it depends on the content. The most reliable route is to try and compare: save the same image in two formats and look at the file sizes.
The practical estimate
For everyday use a rough feel is enough: a normal web photo (around 2000 px wide) as JPG Q80 typically weighs 200–600 KB. A full-resolution phone photo 3–8 MB. A PNG screenshot anywhere from 100 KB to several MB depending on content. Need a file smaller? Turn the dials above: smaller pixel dimensions, a more efficient format, stronger compression. The tool is the compressor — browser-local, with a live size preview so you see the effect immediately.
In short
- Four dials: pixels, format, compression, content.
- Raw = width × height × 3 bytes; compression shrinks it massively.
- Content decides — detail stays big, smooth areas go small.
- Need it smaller? Turn the dials and compare.