Get a quote.

tell us what you are looking to achieve & we will design a strategy to reach your goals. rather speak to someone? call 0800 222 9300.

Submit.

We'll do our best to respond within 2 working hours.

If you need a quicker response please call us on 0800 222 9300.

clicky / #Magazine.

call 0800 222 9300 lines closed until Monday 9am

Get a quote.

news / 4 years ago

Retina graphics using Retina.js.

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 ...

Author.

Oliver Yeates

[CEO & Founder]

Published.

16/01/2013 @ 18:18pm

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: (https://www.clicky.co.uk/wp-content/uploads/web-trends-2013.png)

Double pixel version: (https://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

#more

company / 21 hours ago

Clicky’s MacMillan Coffee Morning.

just for fun / 3 days ago

Clicky Island Discs / Nathan Smedley.

insight / 5 days ago

Google Penguin Now Part of Core Algorithm.

insight / 1 week ago

Service Spotlight: Device Bid Modifiers.

company / 1 week ago

Huel choose Clicky.

company / 1 week ago

Your Travel choose Clicky.

news / 2 weeks ago

ApplePay for Mac Safari to be rolled out next week.

just for fun / 2 weeks ago

Clicky Island Discs / David.

company / 3 weeks ago

Clicky Hosting Girls Only Tech Event.

company / 3 weeks ago

Clicky to open regional office in Nottingham’s Creative Quarter.

news / 3 weeks ago

Bing Network Share Reaching New Heights.

insight / 3 weeks ago

Service Spotlight: Negative Keywords.

news / 4 weeks ago

Facebook Continuing to Improve Mobile Site Performance.

company / 1 month ago

#clickyis9 video.

insight / 1 month ago

Travel Industry Stats 2016.

View more.

We are recruiting.

Clicky is growing and there’s loads to do. You’ll never have this much fun working this hard. #bepartofsomethingspecial

see careers