ApoorvSaxena / lozad.js

🔥 Highly performant, light ~1kb and configurable lazy loader in pure JS with no dependencies for responsive images, iframes and more
https://apoorv.pro/lozad.js/demo/
MIT License
7.44k stars 447 forks source link

data-srcset 'w' attribute explanation #257

Closed sajcics closed 3 years ago

sajcics commented 3 years ago

I can't find explanation what exactly w attribute inside data-srcset stands for? When I define <img class="lozad" data-srcset="img1.jpg 500w, img2.jpg 1000w"> does 500w means to min-width or max-width of the screen or?

Thank you.

sajcics commented 3 years ago

Yeah. I found out answer. If someone has same question, follow this link: https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images