"Why is this image 8 MB?" is one of the most common questions people have about their photos, and the answer is rarely a single thing. An image's file size comes down to four ingredients working together: how many pixels it has, how much colour data each pixel carries, the format it's stored in, and how hard that format compresses. Understand those four and you can predict — and control — the size of any image.
1. Pixel dimensions: the biggest factor
An image is a grid of pixels, and the total count is width × height. A 4000×3000 photo contains 12 million pixels; a 1000×750 version of the same photo contains 750,000 — sixteen times fewer. Because the raw data is proportional to pixel count, dimensions are usually the dominant influence on file size.
This is why the same photo can be 6 MB straight off a camera and 200 KB after it's been scaled to fit a web page. Nothing about the content changed — there were simply far fewer pixels to store. If a file feels too big, the first question to ask is "is it larger than it needs to be?"
2. Bit depth: colour data per pixel
Each pixel stores colour using a certain number of bits. Standard images use 8 bits per channel — 8 for red, 8 for green, 8 for blue — which is 24 bits ("true colour", ~16.7 million colours) per pixel. Add an alpha (transparency) channel and you're at 32 bits per pixel. Some formats also support a reduced palette: PNG-8, for instance, stores at most 256 colours, which makes simple graphics much smaller.
Bit depth matters most for the uncompressed size. A 1000×1000 image at 24-bit is 3 million bytes raw (1,000,000 pixels × 3 bytes). That number is what compression then works to reduce.
3. Format: the compression strategy
The format determines how that raw data is squeezed:
- Lossless formats (PNG) shrink files by spotting redundancy — runs of identical colour, repeated patterns — without changing any pixel. Great for flat graphics; less effective on photos, which have little exact repetition.
- Lossy formats (JPEG, lossy WebP) go further by discarding detail the eye barely notices. This is why a JPEG photo is a fraction of the size of the same photo as PNG.
The mismatch between content and format is a common cause of bloat: a photograph saved as PNG can be five times bigger than it should be, while a flat logo saved as JPEG is both larger and uglier (it gains artefacts) compared to PNG.
4. Compression level: the quality dial
Within a lossy format, the quality setting decides how aggressively detail is thrown away. The relationship isn't linear — there's a wide band near the top (say 85–100%) where lowering quality removes data you can't see, so the file shrinks with no visible change. Push below ~70% and the losses become noticeable as softening and blocky edges.
Dimensions and format are coarse, powerful levers; the quality slider is the fine-tuning. Resize to the size you actually need, choose the format that matches the content, then dial in quality.
Putting it together: a worked example
Say you have a 4032×3024 photo from a phone, saved as a 5 MB JPEG, that you want to use as a 1200px-wide blog image:
- Resize to 1200px wide → about 1200×900, roughly one-tenth the pixels.
- Keep JPEG (it's a photo) or switch to WebP for extra savings.
- Quality 80% → visually identical for a blog image.
The result is typically 100–250 KB — a 95%+ reduction — with no difference a reader would ever notice. The resize did most of the work; format and quality refined it.
Why two images of the same size differ wildly
Content matters too. Lossy compression works by finding detail it can discard, so a busy, highly-detailed image (foliage, gravel, crowds) compresses less than a simple one (a clear sky, a flat background) at the same dimensions and quality. That's expected — there's genuinely more information to store. It's also why you can't predict an exact output size in advance; you compress and measure.
For the practical follow-through, see how to compress without losing visible quality, resizing images for the web, and JPG vs PNG vs WebP.
The tool shows the before/after size and percent saved for every file — resize, re-format, and compress in your browser.