Dense.js – Serve Retina 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.

Your device pixel ratio was seen as and rounded up to 1. As such, you are seeing the 1x variation of the above image. The image tag doesn’t define data-1x attribute, so we are defaulting to src.
If the image doesn’t specify any data-nx attributes, retina image paths are constructed by appending a _{ratio}x suffix to the src. For /img/image.jpg 2x retina image would be looked from /img/image_2x.jpg.



Add a Comment

Your email address will not be published. Required fields are marked *