Get new jQuery plugins just once a week

×

Dense

FavoriteLoadingAdd to favorites

June 23, 2014

Dense | jQuery plugin for retina pixel ratio aware images

Dense is a jQuery plugin that offers an easy way to serve device pixel ratio aware images, bringing in retina support to your website. Clear the blurry, images be crisp.
When attached to an image, the correct image variation is selected based on the device’s pixel ratio. If the image element defines data-{ratio}x attributes (e.g. data-1x, data-2x, data-3x), the most appropriate of those is selected.
If no data-ratio attributes are defined, the retina image is constructed from the src attribute. The searched high pixel ratio images follows a {imageName}_{ratio}x.{ext} naming convention. For an image found in /path/to/images/image.jpg, the 2x retina image would be looked from /path/to/images/image_2x.jpg.

Created by Jukka Svahn

Download

Example

Dense jQuery plugin

retina images

Dense

Related posts:

Map Marker
Phantoscope
Salvattore

To install using Bower
bower install dense

Dense jQuery plugin

http://jquer.in/wp-content/uploads/2014/06/Dense.jpg

jQuery plugin

Sign up for our weekly newsletter.

* We won't spam you ever