Support » Plugin: Lazy Loader » block lazyloading with serverside rendering?

  • Resolved Insomnia88

    (@insomnia88)


    I want to use server side rendering to add some stuff to the image block, including a “no lazyload” option. Is it possible to somehow block the lazy loading? I can add attributes but not remove the lazyload ones, it’s kinda weird.

    My function is added via this filter (it doesn’t matter if I put priority to 20000 or 10)
    add_filter( 'render_block', 'overwrite_core_blocks', 20000, 2 );

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Florian Brinkmann

    (@florianbrinkmann)

    Hi,

    if the attributes of Lazy Loader are not part of the markup that is passed to that filter, you can set the data-no-lazyload attribute on the img element or use the disable-lazyload class on a surrounding element (in the case of the image block that would be the figure element. That should prevent Lazy Loader from adding its attributes to that image.

    Best,
    Florian

    Thanks, that’s the solution!

    Plugin Author Florian Brinkmann

    (@florianbrinkmann)

    You’re welcome, great to hear that it works 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘block lazyloading with serverside rendering?’ is closed to new replies.