You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found a small workaround for now. It doesn't implement lazy loading, but it reduces the load time for large galleries. The large load comes from loading all the images to measure their height and width for Photoswipe.
If you have thumbnail images, you can switch the code to use the thumbnail's dimensions to figure out an aspect ratio, set a fixed large enough width and calculate a height from it.
Lines 47-60 of load-photoswipe.js
// load the image to check its dimensions// update the item as soon as w and h are known (check every 30ms)varimg=newImage();img.src=$img.attr('src');varwait=setInterval(function(){varw=img.naturalWidth,h=img.naturalHeight;if(w&&h){clearInterval(wait);ratio=w/hitem.w=1920;item.h=1920/ratio;}},30);
No description provided.
The text was updated successfully, but these errors were encountered: