Retina graphics using Retina.js

Published on 16 January 2013 by Oliver Yeates in Retina Graphics

As Apple continue to bring out new devices with the double pixel display known as “Retina” displays it is encouraging more and more web designers to start creating retina versions of graphics to make sure their websites take advantage.

This image has been “retinaised” too!

A great little script which we have been using is Retina.js.  Retina.js is a simple piece of JavaScript which checks for double sized pixel versions of each of your graphics as they load.

You can download it here, you then need to call it in the header of your website like this:

<script type=”text/javascript” src=”http://www.yourwebsite.com/js/retina.js”></script>

The script initially allows the standard image to load (in the interests of speed) before searching for the double pixel version and then subtly replacing the standard image with the retina version.

The process is relatively simple but it will require you to recreate your images in a double pixel size first before saving a double pixel version with “@2x” appended to the end of the file name and then saving the standard image.  (example: a logo saved as “logo.png” would need the double sized version saving as “logo@2x.png” and saved in the same directory as the standard image)

We are going through our website currently updating some of the graphics such as this one:

Standard version: (http://www.clicky.co.uk/wp-content/uploads/web-trends-2013.png)

Double pixel version: (http://www.clicky.co.uk/wp-content/uploads/web-trends-2013@2x.png)

The results are great but the process is incredibly time consuming, especially if you have a lot of images.

The main thing to consider is all future images are best started on a double pixel width canvas before you start to build the graphic.

If you have a Retina display check out our home page to see the results.

Links: Retina.js 

About the Author | Google

Leave a Reply

@clickymedia: Good luck to the @yewtreebunbury tonight at the @VE_Awards #puboftheyear
@clickymedia: @DJMaXimumOutput Hi, we've sent an invitation for you to link to our account on 9th May. Let us know if you need any help!
@clickymedia: Which are the top brands on for followers, comments, likes and re-pins? Find out with @clickymedia
@clickymedia: Our very own @JasonClicky has been published on @seomoz! Read his article "Using for SEO Success" #youmoz
@clickymedia: @thelivingroom_ Because we have table football?
@clickymedia: … & results focused. It has been a pleasure dealing with them" Find out more about our services here
@clickymedia: Another really nice testimonial from our SEO client, Aaron & Partners "the team at Clicky have been responsive, easy to work with...
@clickymedia: See the end result here
@clickymedia: I would happily recommend Clicky Media™, and look forward to working with them on new projects and features in the future." Thank you!
@clickymedia: …They encouraged us to take part in the creative process and were prepared to push the boundaries...
@clickymedia: A nice testimonial from our client West Coast Energy - "Clicky understood from the get-go what we were trying to achieve with our new site..
@clickymedia: Hi having a few issues with our phone system this morning - calls directed to mobiles so please bear with us if you can't get through!
@clickymedia: Delighted to have @mybunjee as a new client! (As seen on @BBCDragonsDen) Can't wait to get started!
@clickymedia: We've launched a new minisite for West Coast Energy! Find out more, here: #web
@clickymedia: RT @suzanneclicky: @clickymedia @westcoastgroup Check out the exciting new minisite we've just launched for West Coast Energy! /…