diff --git a/resources/scripts/lazyload.js b/resources/scripts/lazyload.js index 744285ae..8104048e 100644 --- a/resources/scripts/lazyload.js +++ b/resources/scripts/lazyload.js @@ -16,7 +16,7 @@ if( typeof IntersectionObserver !== "undefined" && "forEach" in NodeList.prototy changes.forEach(function(change) { if(change.isIntersecting) { change.target.setAttribute("src", change.target.getAttribute("data-src")); - if(change.target.hasAttribute("srcset")) { + if(change.target.hasAttribute("data-srcset")) { change.target.setAttribute("srcset", change.target.getAttribute("data-srcset")); } observer.unobserve(change.target);