Support » Plugin: Lazy Loader » lazyload doesnt work with gutenberg/5.x?

  • Resolved Insomnia88

    (@insomnia88)


    Does this plugin support wordpress with activated gutenberg? Because my images arn’t lazyloaded (I am watching with the console). I have a new fresh installment with a custom themes and 2 custom plugins so there shouldn’t be actually any conflicts. The console is also showing me no conflicts.

    If this doesn’t work with gutenberg is there another lazyloading plugin that does?

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

    (@florianbrinkmann)

    Hi,

    it works with the block editor. If it works for images that are added via plugins depends on how they generate the image markup. If you post a link to your site I could take a look at it.

    Best,
    Florian

    I am currently working on a local server but I could upload when I have the time.
    I just found the error, I have customized markup and this seems to break your plugin.
    I added the lazyload class and attribute to my block and now it works 🙂

    offtopic: I still wonder how you managed to replace the image. I tried using my “own” lazyloading mechanic with blazy.js but when I replaced the src of the image with a placeholder wordpress “destroyed” the code when saving/refreshing the page. Probably because it recognizes that the src didn’t match with the data-src or image id.

    Plugin Author Florian Brinkmann

    (@florianbrinkmann)

    All right, great to hear that 🙂

    The plugin modifies the markup after it is fetched from the database, so the editor in the backend is not aware of the change (you can see the entry point here: https://github.com/florianbrinkmann/lazy-loading-responsive-images/blob/master/src/Plugin.php#L92 the_content is a filter that gets all the post/page content before it is displayed in the frontend).

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘lazyload doesnt work with gutenberg/5.x?’ is closed to new replies.