How to Make Your Website Ready for Retina Ready Display

Editor's note (2026): We've updated this 2014 tutorial. The original code had formatting errors, and we've added modern techniques (srcset, image-set(), and SVG) that are now the standard way to support high-resolution screens. An unsupported "90%" statistic has been removed.

Responsive design makes your website work on any screen size. Retina (high-DPI) displays, found on most phones, tablets, and many laptops, pack more pixels into the same space, so standard images can look blurry. Here's how to make your site look sharp everywhere.

1. Use SVG for logos and icons

Vector graphics (SVG) scale perfectly to any resolution and are usually small files. Use SVG for logos, icons, and simple illustrations whenever you can.

2. Serve high-resolution images with srcset

For photos, provide multiple versions and let the browser pick the right one:

<img src="photo-400.jpg"
     srcset="photo-400.jpg 1x, photo-800.jpg 2x"
     width="400" height="600"
     alt="Description of the photo">

The browser downloads the 2x version only on high-DPI screens, so standard screens don't waste bandwidth.

A simpler approach is to use one 2x image and display it at half size:

<img src="photo-800x1200.jpg" width="400" height="600" alt="Description of the photo">

Browsers downscale images smoothly, but every visitor downloads the larger file.

3. High-resolution CSS background images

Use image-set() to offer different background images by resolution:

.hero {
  background-image: image-set(
    url("hero.png") 1x,
    url("hero-2x.png") 2x
  );
  background-size: cover;
}

Or use a resolution media query:

.icons {
  background-image: url("icon-sprite.png");
  background-repeat: no-repeat;
}

@media (min-resolution: 2dppx) {
  .icons {
    background-image: url("icon-sprite-2x.png");
    background-size: 200px 100px;
  }
}

4. Polish downscaled images

If an automatically downscaled image looks soft, hand-optimize the standard-resolution version in your image editor for crisper results.

5. Text, borders, and effects

Text, CSS borders, gradients, and shadows are drawn by the browser, so they're automatically sharp on Retina screens. Prefer CSS over images for these effects.

6. Optimize file sizes

High-resolution images are larger, and image size is one of the biggest factors in page speed.

  • Use modern formats like WebP or AVIF.
  • Compress images with tools such as Squoosh, TinyPNG, or ImageOptim.
  • Lazy-load images below the fold with loading="lazy".

Want your website to look sharp and load fast on every device? I.T. For Less can help — contact us.

Design