Hello,
Love this plugin, however I'm not fan of adding a class on each imagess to apply laryload on them.
It could be done by targeting image with data-src or data-srcset attributes directly.
My two cents on this:
class-based selectors outperforms data attribute matching,So I find it beneficial the way it is now.
It could be done by targeting image with data-src or data-srcset attributes directly.
Yeah, but what about scripts, iframes? That kind of stuff adds code complexity and starts to make assumptions about data structure that could have unexpected consequences. For example, WordPress may add data-src AND src automatically. But it doesn't add the lazyload class.
Most helpful comment
My two cents on this:
class-basedselectors outperformsdata attributematching,So I find it beneficial the way it is now.