How to make Fluidbox works with Lazysizes
l2aelba opened this issue · 3 comments
l2aelba commented
I just made a tuturial + tricks here (Since many issues about this)
I will show how to get it work with https://github.com/aFarkas/lazysizes
HTML :
<a class="lazy-fluidbox" href="#"><img class="lazyload" data-src="#"></a>
JS :
document.addEventListener('lazybeforeunveil', function(e){
// Fluixbox
setTimeout(function(){
$(e.target).parent('.lazy-fluidbox').fluidbox({loader:true});
},100);
});
Done !
Any better trick, so just well come
terrymun commented
Thanks for the suggestion. It is probably useful for others who are working with Lazysizes, even though there have been no reported issues about integrating the two.
I believe it's a matter of implementation and not a bug itself, so I will be closing this.
olafgleba commented
Sadly this doesn't work when using data-srcset
(instead of data-src
). And i am afraid i have no solution to this so far.