• Hi,

    when using the block gallery plugin and autoptimize with lazy loading active, the images get stacked and cropped when viewing is set to masonry. I also tried out the beta version of AO, but got the same results.
    Intersting thing is, that in edit block view it’s working perfect and all images have the correct size and border.

    Problem for me is that I don’t know in which plugin this can be fixed, so that I also created a topic in the block gallery support forum:

    https://wordpress.org/support/topic/lazy-loading-block-gallery/#post-12203167

    I can’t post URL here, because website is not active atm – but If you need more infos please let me know.

    thanks and best regards, Frank

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    The issue is very likely that the blocks are rendered (placed) using JS which probably doesn’t see the images yet due to them being lazyloaded.

    You’ll have to try to exclude those gallery images from being lazyloaded, by adding one of the attributes of the <img tag (typically one of the class names) to the layzload exclusion field.

    Lastly, not (directly) related to your issue; as you’re using AO you undoubtedly consider performance important. In that context do take into account that using blocks in the frontend often adds _a lot_ of JS to your page(s), making your site … slower. Might be that the block gallery is doing this in a smarter way, limiting the impact, but you might want to test the amount of JS on a page with a gallery.

    Thread Starter FrankD

    (@frankddo)

    Excluding these images from lazy loading does not make sense for me. This single page contains a complete nice overview of all pictures (just visible for me!) and because the amount I was lucky that AO now contains a lazy load function.

    You are right with your thoughts about blocks, js and performance. But thanks to AO the website runs very fast except of this one special page!

    Thanks, Frank

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    afraid from AO’s side there’s no workaround but to exclude those gallery images from lazyload frankddo :-/

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Lazy Loading using Block Gallery Plugin’ is closed to new replies.