Web Design & UI/UX9 min read

What DPI for Web Images? Screens Are Not 72 DPI

Screens ignore DPI. A photo saved at 72 or 300 DPI shows the same on any phone or browser. Export by scale instead: @2x and @3x for iPhone, twice the CSS size for the web, and 300 pixels per inch only for print.

By Boone
XLinkedIn
What DPI for Web Images? Screens Are Not 72 DPI

Screens are not 72 DPI. They are not 300 DPI either. A screen counts pixels, and the DPI number saved inside an image is a note for printers that phones and browsers skip. Here is what to export instead for apps, for the web and for print, with every size worked out.

Where 72 DPI comes from

The number is a leftover. The first Mac, released in January 1984, had a 512 x 342 screen at 72 pixels per inch. On that screen one image pixel was one screen pixel, so 72 became the default that design tools wrote into every file, and the advice "save for web at 72" outlived the screen by four decades.

Two words get mixed up here. PPI, pixels per inch, is the density of a digital image or a screen. DPI, dots per inch, is the dots of ink a printer lays down. The field in Photoshop and the export dialogs is really PPI, but most apps label it DPI, and that is how people search for it, so this page uses both.

A modern iPhone screen packs around 460 pixels into an inch. No single file setting could match every screen, and none tries: the screen looks at pixels and nothing else.

Fix 1: same pixels, same photo

Saved at 72 DPI, 1200 x 900 px

A photo of croissants saved at 72 DPI, as Chrome renders it

Saved at 300 DPI, 1200 x 900 px

The same croissant photo saved at 300 DPI, rendered identically by Chrome
Both files rendered by Chrome. Both are 289,848 bytes, their decoded pixels match exactly, and the two screenshots are identical pixel for pixel.

We saved one photo as a JPEG at 72 and at 300 DPI, and as a PNG at both. macOS read the files back as 72 and 300. Chrome drew all four at 1200 CSS pixels wide, on a normal screen and on a 3x screen. The number changed nothing.

That holds for every place a screen shows an image: an <img> tag, a CSS background, an app's image view, an email. The HTML standard has one narrow exception, for files that also carry matching EXIF pixel dimensions, and a normal 72 or 300 DPI export never meets it.

So when a developer asks for "the 72 DPI version", the useful reply is a pixel size. When a stock site offers "web, 72 DPI", check the pixel dimensions instead.

Fix 2: export @2x and @3x for apps

44 px file, stretched 3 times

A message row on a 3x screen with a 44 pixel avatar, and a zoom showing it blurred

132 px file, one pixel per pixel

The same row with a 132 pixel avatar, and a zoom showing a sharp face
A message row drawn by Chrome on a 3x screen, with the avatar in a 44 pt circle. Under each row, a 4x zoom of the same patch of screen pixels.

Apps are designed in points, not pixels, the same unit you set mobile font sizes in. One point is one pixel on a @1x screen, two on @2x and three on @3x. A 44 pt avatar on a current iPhone covers 132 screen pixels.

Hand it a 44 px file and the phone stretches every pixel into a 3 x 3 block, which reads as soft. Hand it 132 px and each pixel lands on one screen pixel.

Apple's guidelines ask for high-resolution versions of every bitmap for every device you support: @2x and @3x for iPhone, @2x for iPad. Android does the same with density buckets, where one dp is one pixel at 160 dpi and every other bucket is a multiple of that.

The same fix applies to every bitmap in an app: avatars, product photos, onboarding art, map pins, splash images and any icon that is not a vector.

Fix 3: double the CSS size on the web

200 px file, soft on Retina

A product card on a 2x screen with a 200 pixel photo, and a zoom showing soft laces

400 px file, sharp on Retina

The same card with a 400 pixel photo, and a zoom showing crisp laces and stitching
A product card drawn by Chrome on a 2x screen, the photo in a 200 px slot. Under each card, a 4x zoom of the same patch of the shoe.

Browsers work in CSS pixels. A 200 px wide slot on a Retina laptop or a phone covers 400 or 600 device pixels, and the ratio between the two is the screen's devicePixelRatio. A ratio of 1 is the classic 96 DPI desktop monitor, 2 is Retina, and most current phones are above 2.

So make every image at least twice its CSS size, and let the browser pick with srcset: a 1x, 2x and 3x file, and each screen downloads only the one it needs. The 1x file keeps old monitors from loading pixels they cannot show.

Do it for card thumbnails, hero images, team photos, blog covers, logos that are not SVG, and the screenshots in your docs.

Fix 4: count 300 pixels per inch for print

1200 px file, 90 ppi

One inch of a 13.4 by 10 inch print from a 1200 pixel file, showing large blocky pixels

4016 px file, 300 ppi

The same inch of the print from a 4016 pixel file, showing fine pastry detail
The same inch of the same 13.4 x 10 inch print, at the same zoom. The only difference is the file behind it.

Paper is the one place DPI is real, and even there you count pixels. Print shops ask for 300 pixels per inch at the final printed size. A 13.4 x 10 inch print needs a 4016 x 3012 file. The 1200 x 900 web version stretched to that size has about 90 pixels in every inch, and the pastry turns into blocks.

Changing the DPI field from 72 to 300 without adding pixels only changes the print size the file suggests: the same 1200 pixels at 300 per inch make a 4 inch print. To print bigger, you need a bigger original. Some printers accept less than 300, so ask the shop for its spec.

The scales for every platform

PlatformDesign inExport
iPhonept@2x, @3x
iPadpt@2x
Android mdpidp1x
Android hdpidp1.5x
Android xhdpidp2x
Android xxhdpidp3x
Android xxxhdpidp4x
WebCSS px1x, 2x, 3x
Printinches300 ppi at final size

Pixel sizes you can copy

The multiplication done for the sizes people ask about most.

You design1x2x3x
44 pt avatar (iOS)4488132
200 px card photo (web)200400600
48 dp icon (Android)48 at mdpi96 at xhdpi144 at xxhdpi

Android also wants 72 px at hdpi and 192 px at xxxhdpi for that 48 dp icon.

Print sizePixels at 300 ppi
4 x 6 in1200 x 1800
8 x 10 in2400 x 3000
A4, 8.27 x 11.69 in2480 x 3508
13.4 x 10 in4016 x 3012

Hand this to your developer

On the web, one image in three sizes:

html
<img src="card-200.jpg" srcset="card-200.jpg 1x, card-400.jpg 2x, card-600.jpg 3x" width="200" height="200" alt="White leather sneaker" />

For iOS, name the files by scale and put them in one image set in the asset catalog: avatar.png, avatar@2x.png, avatar@3x.png. For Android, put the same file name in each density folder: drawable-mdpi, drawable-hdpi, drawable-xhdpi, drawable-xxhdpi, drawable-xxxhdpi. Use SVG or vector drawables for icons and logos, and the scale question goes away; SVG or PNG covers which format to pick, and a clean Figma to developer handoff covers the rest of the export.

How to export by scale in Figma

Figma has no DPI field at all. In the Export panel, add one row per size and type a multiplier with an x (1x, 2x, 3x) or a fixed width with a w (400w). Add a suffix like @2x to each row so the files come out named the way iOS expects. Figma writes 72, 144 or 216 into the file's metadata at 1x, 2x and 3x, and as above, no screen reads it.

FAQ

What DPI should images be for the web?

DPI does not matter for the web. Browsers ignore it and size images by their pixels. Make each image at least twice the CSS size it is shown at, and serve 1x, 2x and 3x files with srcset.

Is 72 DPI or 300 DPI better for screens?

Neither. The same photo saved at 72 and at 300 DPI has the same pixels and looks identical on screen. 300 matters only when the image is printed.

What is the difference between PPI and DPI?

PPI is pixels per inch, the density of a digital image or a screen. DPI is dots of ink per inch, a printer's measure. Most software labels the image setting DPI, but it is PPI.

What size should app images be exported at?

At @2x and @3x of their size in points for iPhone, @2x for iPad, and at 1x, 1.5x, 2x, 3x and 4x of their size in dp for Android. A 44 pt image needs a 132 px file on a 3x iPhone.

How many pixels do I need to print a photo?

Multiply the print size in inches by 300. A 13.4 x 10 inch print needs 4016 x 3012 pixels, and an 8 x 10 inch print needs 2400 x 3000.

Sources

More from Brainy Papers

Keep reading