Image size guide
Image dimensions vs file size: two different measurements
A 4,000 × 3,000 image describes twelve million pixels. A 4 MB file describes storage. The numbers influence each other, but format and image content decide how efficiently those pixels can be stored.
Reviewed July 31, 2026 · 8 min read
Short answer
The practical choice
Image dimensions are width and height in pixels; file size is the number of bytes stored or transferred. Reducing dimensions removes pixels and usually cuts file size sharply. Compression changes how efficiently the remaining pixels are stored. For web or email, resize to the largest display size you actually need, then choose the format and quality setting.
Pixel count sets the amount of image data
Multiply width by height to get the pixel count. A 4,000 × 3,000 photo contains four times as many pixels as a 2,000 × 1,500 version. Before compression, that difference is substantial.
A browser may display both images at 800 pixels wide, but it can still download the larger source unless responsive image markup or a correctly sized export is used.
- Dimensions: width × height in pixels
- Display size: how large the image appears
- File size: bytes on disk or over the network
- Resolution metadata such as DPI does not by itself add or remove pixels
Format and content change compression efficiency
Two images with identical dimensions can have very different file sizes. A clean graphic with flat color may compress efficiently as PNG, while a noisy photograph contains many small changes that are expensive to preserve losslessly.
JPEG and lossy WebP can discard detail to reduce size. PNG keeps decoded pixels exact. Transparency, animation, embedded color profiles, thumbnails, and metadata can also affect the final file.
Resize before pushing quality too low
If an image will never appear wider than 1,200 pixels, exporting a 4,000-pixel source usually wastes transfer size. Resize a copy to the required dimensions first, then adjust quality while inspecting text, faces, gradients, and sharp edges.
Heavy compression at oversized dimensions can produce a file that is still larger than needed and looks worse. Removing unused pixels is often the cleaner first step.
- Find the maximum display or upload dimensions
- Preserve aspect ratio while resizing
- Choose a format suited to the image
- Inspect the result at 100% and at its real display size
- Keep the original outside the delivery folder
Choose the tool based on the actual constraint
Use a resize tool when width or height is the problem. Use compression when the dimensions are correct but the file still exceeds a byte limit. Convert formats when the destination or image content makes another codec more suitable.
For strict upload limits, leave some room below the published maximum. Metadata and encoder differences can move the final size slightly, and some services process the file again after upload.