Skip to content

Lazy loading does not work with masonry galleries #18

@Janhouse

Description

@Janhouse

When using Masonry gallery block ( https://wordpress.org/plugins/block-gallery/ ) in the new Gutenberg editor, lazy loader breaks the gallery (all images are shown in a messy pile). It seems like block-gallery plugin uses JavaScript to calculate sizes and positions of images for Masonry gallery block. Since it does it on page load, it doesn't work properly with lazy loading.
These scripts do recalculate positions and sizes when window gets resized so maybe a potential fix would be triggering of resize event but I'm not sure if it would be nice approach.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions