jQuery-Retina icon indicating copy to clipboard operation
jQuery-Retina copied to clipboard

Idea: update script this to be a polyfill for srcset

Open coliff opened this issue 10 years ago • 0 comments

If the 'jQuery-Retina' script was updated to read the x2 image location from the srcset attribute instead it would work as a great polyfill for srcset.

So jQuery retina markup would read: < img src="/image-x1.png" srcset="/image-x2.png 2x" >

and read/display the image-x2.png from the scrset attribute. This way we can get rid of the data-retina attribute from our markup and modern browsers like Chrome (from v34 onwards) would use the srcset attribute.

Ref: http://blog.chromium.org/2014/02/chrome-34-responsive-images-and_9316.html

coliff avatar Mar 06 '14 15:03 coliff