Image discussions often use “size” and “resolution” as if they mean the same thing. They do not. A web image has several different measurements, and each answers a different question.
Pixel dimensions tell you how many raster pixels the source contains. Rendered size tells you how large it appears in the page. Device pixel ratio describes the relationship between CSS pixels and physical screen pixels. PPI/DPI metadata can describe print-oriented density information. File size tells you how many bytes the encoded resource occupies.
Short version: for normal web delivery, focus first on pixel dimensions, rendered CSS size, responsive source selection and encoded bytes. Do not use a 72/96/300 DPI metadata number as a substitute for those measurements.
Pixel dimensions
A 2400×1600 image contains 3,840,000 pixels. That is the raster’s intrinsic grid before CSS layout changes how large it appears on screen.
Pixel dimensions affect how much source detail is available. If a 500-pixel-wide image is stretched across a 1200 CSS-pixel region, it can look soft. If a 6000-pixel source is displayed in a 400-pixel card, much of the source resolution may be wasted.
Rendered size in CSS pixels
Browsers lay out pages in CSS pixels. An image with an intrinsic width of 1600 pixels can render at 800 CSS pixels, 400 CSS pixels or another value depending on CSS and the container.
MDN distinguishes the intrinsic size of an image from the size produced by layout. That distinction is central to responsive image work.
Device pixels and device pixel ratio
Modern high-density displays can use multiple physical pixels for one CSS pixel. MDN’s devicePixelRatio API describes the ratio between physical display pixels and CSS pixels.
On a 2× display, a 600 CSS-pixel image slot may be rendered with roughly 1200 physical pixels across. A source around 1200 pixels can therefore appear sharper than a 600-pixel source in that context.
That does not mean you should hard-code one 2× image for everyone. Responsive image selection lets the browser choose according to actual conditions.
PPI and DPI
PPI means pixels per inch; DPI properly refers to dots per inch, often in print/output contexts. Image-editing applications may store or display a resolution metadata value such as 72, 96 or 300 PPI.
For ordinary web rendering, changing that metadata while keeping the same pixel dimensions generally does not create more screen detail. A 1200×800 file is still a 1200×800 raster.
CSS does define 1in as 96 CSS pixels in its absolute-length system, but that is a CSS unit relationship—not an instruction that every web image must be exported at 96 PPI.
File size in KB or MB
File size is the number of encoded bytes transferred or stored. It depends on much more than dimensions:
- format;
- compression type and quality;
- image complexity and noise;
- alpha transparency;
- metadata;
- encoder implementation.
Two 1600×900 JPEGs can have very different byte sizes. A detailed noisy photograph is generally harder to compress than a flat graphic with broad areas of similar color.
Why “resolution” is an overloaded word
People use “resolution” to mean at least three things:
- pixel dimensions, such as 1920×1080;
- screen density, such as 2× device pixel ratio;
- print density metadata, such as 300 PPI.
Those are related but not interchangeable. Ask which meaning is intended before applying advice.
What determines whether an image looks sharp?
Sharpness depends on the relationship among:
- the detail present in the original;
- the intrinsic pixel dimensions of the delivered source;
- the rendered CSS size;
- display density;
- resampling quality;
- compression artifacts;
- the visual content itself.
A well-focused, well-resized 1200-pixel source can look better than a poorly compressed 2400-pixel source. More pixels alone do not guarantee quality.
What determines performance?
Transfer size matters directly, but pixel dimensions also matter because larger resources can require more decoding memory and processing. The performance workflow is therefore:
- remove unnecessary dimensions;
- choose efficient source candidates;
- choose an appropriate format;
- compress to a visually acceptable level;
- make sure the browser selects the right candidate.
This is why resize vs compress is not an either/or decision.
Example: same file, different web behavior
Imagine a 1200×800 WebP file tagged with 72 PPI. Change only the PPI metadata to 300 while keeping the raster at 1200×800.
In ordinary HTML/CSS where the image is displayed at, say, 600 CSS pixels wide, the useful screen-detail relationship is still 1200 source pixels for a 600 CSS-pixel slot—roughly a 2× source. The PPI metadata did not create additional pixels.
Now resize the same image to 600×400. The source has genuinely changed. It contains half as many pixels in each dimension. If displayed at 600 CSS pixels, it may be fine on a standard-density screen but softer on a higher-density screen.
CSS pixels are not always physical pixels
MDN defines a CSS pixel as a CSS length unit and notes that on high-resolution screens, one CSS pixel can correspond to multiple device pixels. That abstraction allows interface sizes to remain perceptually useful across different displays.
This is another reason “my monitor is 220 PPI” does not directly tell you which image file width to export. The browser’s layout and device-pixel relationship mediate the result.
Which measurement should you use for which decision?
| Decision | Primary measurement |
|---|---|
| Will the image be sharp enough? | Intrinsic pixels vs rendered CSS size and DPR |
| Will it fit the component? | Rendered width/height and aspect ratio |
| Will it load efficiently? | Encoded bytes + correct source selection |
| Should it be cropped? | Aspect ratio and composition |
| Is 72 or 300 PPI correct for the web? | Usually the wrong question; use pixel dimensions |
| Will it print at a chosen physical size? | Pixel count + print PPI/output requirements |
Worked example: a 900 CSS-pixel article image
An image renders at a maximum of 900 CSS pixels wide.
A 900-pixel source can map closely to a standard-density display. An 1800-pixel source can provide additional detail for a 2×-style scenario. Instead of choosing one and forcing it on everyone, provide responsive candidates and let the browser decide.
Then compare byte size. A 1800-pixel source may still be efficient after good encoding, but it should be downloaded only when useful.
What to optimize first
- Correct composition and aspect ratio.
- Correct dimensions for the layout.
- Responsive source selection.
- Format.
- Compression quality.
- Loading and priority behavior.
That sequence prevents you from obsessing over a metadata number while shipping thousands of unnecessary pixels.
Use the measurements that matter
With the browser image tool, the controls that directly affect delivery are target width/height, output format and quality. Those change the actual raster or encoding, unlike merely editing a print-density metadata tag.
Frequently asked questions
Is 1920×1080 a resolution or dimensions?
It is a pair of pixel dimensions. People commonly call it a resolution, but it does not by itself specify PPI, physical size or encoded file size.
Does a higher PPI make a web image sharper?
Not when the pixel dimensions remain unchanged in a normal browser workflow. Sharpness depends on source pixels relative to rendered size and display density.
Why is a smaller-dimension image sometimes a larger file?
Format, quality, image complexity, metadata and encoder behavior can outweigh the reduction in pixel count. Dimensions influence bytes but do not determine them alone.
What matters most for website performance?
Serve appropriately sized images, encode them efficiently, and make sure the browser downloads the right source for the actual layout.
Sources and further reading
Image Resizing & Dimensions
A practical series on choosing, resizing, cropping, and delivering the right image dimensions for the web.
- Image Resizing: The Complete Guide to Dimensions, Resolution and Aspect Ratio
- How to Resize an Image Without Losing Visible Quality
- Crop vs Resize: What’s the Difference?
- Aspect Ratio Explained: How to Resize Images Without Stretching Them
- Best Image Size for a Website: Hero, Banner, Blog and Content Images
- Best Hero Image Size for Desktop and Mobile
- Pixels vs Resolution vs File Size: What Actually Matters on the Web?
- Does DPI Matter for Web Images? The 72 DPI Myth Explained