-
Notifications
You must be signed in to change notification settings - Fork 441
Open
Description
Firstly, thanks fo creating this amazing tool. I use it on almost every website I build. I would, however, like to open a discussion about the way that picture elements are lazy-loaded.
Why not just put the class lozad
on the picture element and add then, when it enters the viewport, change all data-srcset attributes to srcset attributes on the source elements and on the img element, do the same but also change data-src elements to src elements.
The markup would then just become
<picture class="lozad">
<source data-srcset="image.png">
<img data-src="image2.png">
</picture>
Adding the data-iesrc
attributes to the picture elements etc just seems confusing to me and I'm not sure what benefit it brings.
I would be very happy to submit a PR if this is something you are interested in?
bitbruder, svale, Gouigouix, arktds, blainemuri and 5 more
Metadata
Metadata
Assignees
Labels
No labels