strues / retinajs

JavaScript, SCSS, Sass, Less, and Stylus helpers for rendering high-resolution image variants
http://retinajs.com
MIT License
4.42k stars 610 forks source link

Hi, this is a feature that can save web traffic when loading image #289

Open EagleQL opened 4 years ago

EagleQL commented 4 years ago

this is a feature that can save web traffic when loading image.

I'v added a attribute data-rjs-src to retina.js. Once a element is setted attribute src to "" and which has data-rjs-src & data-rjs attribute, the logic added by me will try to load the image-url which defined in data-rjs-src by capability.

So retina.js can save web traffic when loading image now

EagleQL commented 4 years ago

hope to merge these code,good luck