Uploading a full-resolution camera photo to a website is the single most common performance mistake. Here's how to size images correctly for the web — and the few numbers you actually need to remember.
The widths that matter
Most site content columns land between 700 and 1200 CSS pixels wide. Double it for high-density screens and you get the practical targets: 1200–1920 pixels for full-width images, 800–1000 for in-article images, and 400–700 for thumbnails. Anything beyond ~2000 pixels wide is wasted bytes for almost every site.
Keep the aspect ratio locked
Changing width and height independently distorts the image — circles become ovals, people become strangers. When you resize images, keep the lock on: enter the width you need and let the height follow the image's own proportions.
Downscale, don't upscale
Downscaling keeps quality: fewer pixels are sampled from real data. Upscaling cannot invent detail that was never captured, so enlarged images go soft. If an image is too small for its slot, find a larger original rather than stretching it.
What about inches, cm and DPI?
For screens, DPI is metadata — a 300 DPI label on a 1200-pixel image changes nothing for browsers, which use the pixels themselves. Physical units matter for print planning, which is why a good resizer (including Pixitools' resizer) supports inch/cm/mm with an adjustable DPI — but for web work, pixels are the unit that matters.
After resizing
Resizing reduces pixel count; compression and format choice reduce encoding overhead. Do the resize first, then see how to compress images for faster websites for the second half of the equation.
Try it with these tools
Related articles
Optimization
How to Compress Images for Faster Websites
Quality settings that survive visual inspection, target-size compression for hard limits, and the format choices that do most of the work.
Read articleOptimization
How to Reduce Image File Size Without Losing Too Much Quality
A practical order of operations: resize first, pick the right format, then compress with the right quality — with rules of thumb that hold up.
Read articleEvery tool mentioned in this article runs entirely in your browser — see privacy for what that means.