godaddy-wordpress / block-gallery

WordPress gallery blocks built exclusively for Gutenberg
https://wpblockgallery.com
GNU General Public License v2.0
57 stars 13 forks source link

Support of lazy loading #7

Closed Janhouse closed 4 years ago

Janhouse commented 5 years ago

Adding some sort of support for lazy loading plugins would be great. Using other lazy loading plugins like https://wordpress.org/plugins/lazy-loading-responsive-images/ breaks Masonry galleries because the correct size of images is not known at the time of page load.

Could you add some JavaScript event to check if the image is actually loaded and only then do the calculation? The previously mentioned plugin loads base64 encoded 1x1 pixel image in src attribute when image is not yet loaded.

richtabor commented 4 years ago

Thanks for the feedback! We're actually focusing development on CoBlocks and deprecating Block Gallery moving forward. CoBlocks has all the same features (and more!) - and each gallery added with Block Gallery can be transformed into its corresponding CoBlocks gallery.