Compression5 min read·Updated

72 vs 300 DPI: What DPI Should Web Images Be?

For the web, DPI does not matter: it is a single number stored in the file's metadata, and browsers size images by their pixels, so a 1600 × 1200 image looks the same and weighs the same at 72, 96 or 300 DPI. What counts online is the pixel dimensions; DPI only matters when you print, where pixels = inches × DPI (a 4 × 6 in print at 300 DPI needs 1200 × 1800 pixels).

Does DPI matter for web images?

No. DPI (dots per inch), or more precisely PPI (pixels per inch) for digital images, is an instruction for printing: it says how many of the image's pixels should fit into one printed inch. Browsers ignore it for ordinary images and size them by their pixel dimensions and your CSS. An image 1600 pixels wide shown in an 800 px column looks identical whether its DPI field says 72 or 300, and it costs the visitor exactly the same bytes. Size web images in pixels, using the recommended image sizes.

Why doesn't changing the DPI change the file size?

Because the DPI is just a pair of numbers in the file header. Change it without resampling and only the implied print size moves: the pixels, the file size and the look on screen stay exactly the same. The confusion comes from editors that resample at the same time. In Photoshop's Image > Image Size, raising the resolution from 72 to 300 with Resample checked keeps the print size and multiplies the pixel count by about 17, which is what makes the file bigger. With Resample unchecked, nothing about the image changes except the label.

The same image with three DPI values

DPI fieldPixel sizeFile sizeSize on screenPrint size
721600 × 1200320 KBSame22.2 × 16.7 in
961600 × 1200320 KBSame16.7 × 12.5 in
3001600 × 1200320 KBSame5.3 × 4 in

Where does the 72 DPI rule come from?

From the 1984 Macintosh, whose screen showed 72 pixels per inch so that one pixel matched one typographic point. Windows later assumed 96. Today's screens range from about 100 pixels per inch on budget monitors to over 450 on phones, and operating systems scale everything with a device pixel ratio, so no single DPI describes the web. The “save for web at 72 DPI” advice survives in old tutorials and export presets, but it never made images smaller on its own: the pixel dimensions did.

What controls how big an image looks on screen?

The CSS size (or the width attribute) decides how many CSS pixels the image occupies. Without either, the browser shows it at its pixel width in CSS pixels. On a 2× screen, each CSS pixel is 2 × 2 device pixels, so an image displayed at 800 CSS px needs 1600 real pixels to look sharp. That is the logic behind exporting at twice the displayed width, explained in Retina images and WebP.

When does DPI matter? Printing

On paper, the pixels have to cover a physical size, and the formula is pixels = inches × DPI. 300 DPI is the usual standard for photos and documents viewed at reading distance; 150–200 DPI is often enough for posters seen from a few feet away, because the eye cannot resolve finer dots at that distance.

Pixels needed for common print sizes

Print sizePixels at 300 DPIMegapixelsPixels at 150 DPI
Wallet, 2.5 × 3.5 in750 × 10500.8 MP375 × 525
4 × 6 in (about 10 × 15 cm)1200 × 18002.2 MP600 × 900
5 × 7 in1500 × 21003.2 MP750 × 1050
8 × 10 in2400 × 30007.2 MP1200 × 1500
US Letter, 8.5 × 11 in2550 × 33008.4 MP1275 × 1650
A4, 210 × 297 mm2480 × 35088.7 MP1240 × 1754
11 × 14 in3300 × 420013.9 MP1650 × 2100
A3, 297 × 420 mm3508 × 496117.4 MP1754 × 2480
16 × 20 in4800 × 600028.8 MP2400 × 3000

A 12 MP phone photo (4032 × 3024) prints at about 13.4 × 10 in at 300 DPI, so it covers every size up to 8 × 10 with room to crop. A web-sized 1600 px image, by contrast, prints sharp only up to about 5 × 4 in.

How do you size images for the web instead of setting DPI?

  1. Find the width the image is displayed at in CSS pixels (the browser's developer tools show it when you hover the image).
  2. Multiply by 2 for high-density screens: an 800 px column needs a 1600 px image.
  3. Resize to that width. In the compressor, turn on Limit width and enter it; in Photoshop, use Image > Image Size with Resample checked and the unit set to pixels; on a Mac, Preview's Tools > Adjust Size does the same.
  4. Compress at quality 75–85, or set a target size in KB.
  5. Ignore the DPI field. Whatever it says, the web copy will look the same.
A form or a print shop asks for 300 DPI
They almost always mean enough pixels for the print size, so check your pixel dimensions against the table above. If a system checks the DPI field itself, change it in an editor without resampling (in Photoshop, Image Size with Resample unchecked) as the last step, because tools that re-encode an image often reset that field.
Set a maximum width in pixels and compress in one pass. Nothing is uploaded.

Put it into practice

Compress your images right now: keep the format or set a target size, free and privately in your browser.

Open the compressor

Frequently asked questions

Not on screen. Two files with the same pixel dimensions look identical whatever their DPI. On-screen quality depends on pixel dimensions and compression; DPI only affects printing.

It does no harm and no good. What matters is the pixel width, around 1200–1600 px for content images, and a file size of roughly 50–150 KB.

In Photoshop, open Image > Image Size, uncheck Resample and type 72; in Preview, use Tools > Adjust Size with Resample image unchecked. The file will not get smaller: to make it smaller, reduce the pixel dimensions or compress it.

Phones usually write 72 in the DPI field, but it means nothing until you print. What matters is the pixel count, typically 12 MP or more, enough for an 8 × 10 in print at 300 DPI.

Keep reading

Performance6 min read

Recommended image sizes

Practical max widths for heroes, content, thumbnails and retina — then convert those files to WebP.

Read more
Performance6 min read

Retina and WebP

How to handle 2× and 3× displays with WebP without shipping 3× PNG screenshots.

Read more
Compression10 min read

Prepare images for the web

Prepare web images in 10 steps: pick the format, resize to 2× the display width, compress at quality 75–85, strip metadata, then add alt text and lazy loading.

Read more