Retina Displays, with high pixel density, have been on the market for a few years now. They offer considerably better viewing experience and increase user satisfaction. But even though retina displays aren’t new, most websites still haven’t been adjusted to be properly viewed on retina screens. Considering that more and more retina-based devices appear on the market each year, adopting websites to this technology should be on top of to-do lists of all developers.
Just follow our simple & easy guide to get your retina website ready for market demand.
1. Load 2x Everywhere
This is probably the easiest solution, but not good for your mobile and non-retina users as you will be loading high definition images for all users. Non-retina users on a broadband connection will likely not notice it, however, your mobile users or those with a slower connection are likely to wait longer for your page to load.
Specify the img src to use the high definition graphic
Specify the height and width of the image to the non-retina size
For example, the non-retina (or high definition, I will probably interchange these terms) image is 100×200 pixels. So, specify the height and width of the image using CSS or the attributes in your HTML to be 100×200. But, load the image that is twice the size, or 200×400 pixels.
Your HTML for this might look like:
<img style=”height: 100px; width: 200px;” src=”/firstname.lastname@example.org” alt=”bar” />
2. Use SVG Images
Scalable Vector Graphics (SVG) is a graphic format defined in the Extensible Markup Language (XML) that presents images in high quality. SVG images can be displayed in Internet browsers that use XML, and can be viewed on mobile phones in form of SVGB and SVGT files – variations of SVG format that accommodate mobile technologies.
But SVG graphics are particularly valuable because they can be used to make websites retina-friendly.
SVG graphics offer unmatched viewing experience. Instead of pixels and raster graphics, which traditionally make up JPEG and GIF images, SVG files are made of vector shapes. As such, SVG images remain smooth and clear even when in extreme close-ups.
So if your business has a desktop web page and its responsive equivalent that works on mobile devices, SVG format is what you should implement to provide your customers with crisp graphics and uninterrupted viewing pleasure.