Beginner Guide7 min read

What is an Image File Size? Pixels and Megabytes Explained

Confused by image dimensions, file sizes, and the difference between pixels and megabytes? This plain-English guide demystifies everything you need to know about digital images.

IR

ImageResize Team

You take a photo on your phone and it is 4,000 × 3,000 pixels, but only 2.4 MB. You open that same photo in Photoshop and it says it is 34.3 MB. Your friend exports a photo at 800 × 600 pixels and it is somehow 1.5 MB. What is going on?

Image file sizes confuse almost everyone at first. This guide explains everything from scratch — no prior knowledge needed.

What is a Pixel?

A pixel (short for "picture element") is the smallest unit of a digital image. Think of it like a tiny coloured square. A grid of millions of these squares, each a slightly different colour, forms the complete image you see on screen.

When we say an image is 1920 × 1080 pixels, we mean it is 1,920 squares wide and 1,080 squares tall — a total of 2,073,600 pixels, or roughly 2 megapixels.

What Does "File Size" Mean?

File size is how much space the image takes up on disk (in bytes, kilobytes, or megabytes). This is not the same as the number of pixels. Two images with identical pixel dimensions can have very different file sizes depending on:

Why Does Photoshop Show a Bigger Size Than the File on Disk?

When Photoshop says an image is 34 MB, it is showing you the uncompressed size — the amount of RAM needed to display every pixel at full quality (typically 3 bytes per pixel for RGB colour). When the file is saved to disk as a JPEG or PNG, compression reduces this dramatically.

A 12 MP photo (4000×3000)Size
Uncompressed (in RAM / Photoshop)≈ 34 MB
Saved as PNG (lossless)≈ 8–15 MB
Saved as JPEG at 80% quality≈ 2–4 MB
Saved as JPEG at 50% quality≈ 1–2 MB
Saved as WebP at 80% quality≈ 1–3 MB

The Three Most Common Image Formats

JPEG (.jpg / .jpeg)

JPEG is the most common format for photographs. It uses lossy compression — it permanently discards some image data to make the file smaller. The "quality" setting (0–100) controls how much data is discarded. Lower quality = smaller file, but more visible artefacts (blurry edges, colour banding, blocky areas).

Best for: Photographs, product images, social media uploads.

PNG (.png)

PNG uses lossless compression — no image data is discarded. This means the file looks exactly as good as the original, but the file is typically larger. PNG also supports transparency (a transparent background), which JPEG does not.

Best for: Logos, icons, screenshots, images with transparent backgrounds.

WebP (.webp)

WebP is a modern format developed by Google. It achieves 25–35% smaller file sizes than JPEG at equivalent visual quality, and it supports transparency like PNG. Most modern browsers and phones support it natively.

Best for: Web images where fast loading is critical. Avoid for government portals that may not accept it.

How Does Image Compression Work?

JPEG compression works by dividing the image into 8×8 pixel blocks and throwing away fine detail that the human eye is less sensitive to (particularly high-frequency colour changes). This is why a heavily compressed JPEG looks "blocky" — you can see those 8×8 squares.

PNG compression works differently: it looks for repeating patterns in rows of pixels and stores those patterns efficiently. A solid blue sky compresses to almost nothing; a photo with millions of colour variations does not compress as much.

DPI vs PPI — Does It Matter for Screens?

DPI (Dots Per Inch) and PPI (Pixels Per Inch) are measures of print resolution, not screen resolution. On a screen, only the pixel dimensions matter — a 300 DPI image and a 72 DPI image with the same pixel dimensions look identical on screen.

DPI only matters when you are printing. For printing, aim for at least 300 DPI to get a sharp print.

Practical Tips for Managing Image Sizes

Quick Reference: Common Image Size Targets

Use CaseRecommended DimensionsTarget File Size
Instagram square post1080 × 1080 px< 8 MB
Facebook cover photo820 × 312 px< 100 KB
Website hero image1920 × 1080 px< 300 KB
Email thumbnail600 × 400 px< 150 KB
UPSC form photo200 × 230 px20–300 KB
Printed portrait (4×6 inch)1200 × 1800 px at 300 DPI1–5 MB

Summary

To recap: pixels are the dimensions of an image (width × height). File size is how much space it takes on disk, which depends on format, compression, and content complexity — not just pixel count. And DPI only matters for printing.

Now that you understand the fundamentals, you can make informed decisions about when to resize, when to compress, and which format to choose. Use ImageResize to apply all of these concepts instantly — for free, with no uploads required.

Ready to resize your images?

Free, instant, 100% private — all processing happens in your browser.

Try ImageResize Free
Back to Blog