Support » Plugin: Smush Image Compression and Optimization » Lazy Load and Ajax Load More plugin not working

  • Resolved dcooney

    (@dcooney)


    Hello,
    I am the author of Ajax Load More and I have users who are having issues when using Lazy Load along with Ajax Load More and the add-ons.

    I’ve narrowed the issue down to <noscript/> tags I am using inside the plugin to improve SEO of Ajax loaded content.

    It appears Lazy Load is attempting the run it’s functions on content that is already wrapped in a <noscript/> element. This is causing the layout to break of my customers.

    In the Lazy Load settings there are ways to exclude entire URLs or images by classname/ID. It would be nice if there was a way to simply exclude an entire element (and it’s children) from this functionality or even better, not attempt to Lazy Load content that is already in <noscript/> tags.

    Any help would be appreciated.

    thanks!

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Anton Vanyukov

    (@vanyukov)

    Hi @dcooney,

    Thanks for writing about this incompatibility. I will try to do my best to resolve it. Just as a fast and temp solution – are there any classes or IDs that you are adding to images inside <noscript/>? I could add those classes to an internal exclusion list. We found that this approach works really good with a few other plugins. My main concern is about the parsing of the page to find out if the image is inside an element…

    Best regards,
    Anton

    Hi @ vanyukov
    Thanks for responding.

    are there any classes or IDs that you are adding to images inside <noscript/>?
    Unfortunately I do not control this, the users build their own loop templates so images can have any classnames or id.

    Without knowing all the ins and outs of this Lazy Load portion of your plugin, I feel like Smush should be skipping anything inside a <noscript/> anyways..

    It works perfect if I remove the <noscript/> from rendering.

    thanks again.

    • This reply was modified 1 month, 2 weeks ago by dcooney.
    Plugin Author Anton Vanyukov

    (@vanyukov)

    @dcooney,

    Could you please provide some steps to replicate? I want to test it out. I don’t think that this will fix the issue. It will only be a partial fix. Even if Smush parses the DOM for parent elements and filters out the <noscript/> images (which will also add to the server load on highly visited sites), lazy loading will still add another <noscript/> element to the original . This will result in double images on browsers without js support.

    Best regards,
    Anton

    @vanyukov It requires the core Ajax Load More plugin + SEO add-on.

    Ok, I see what you’re getting at about filtering out noscript elements, but what I’m saying is not just related to my plugin. When Smush encounters a noscript tag with images inside, it injects a nested noscript tag which breaks the layout.

    Screenshot

    For now, Ill instruct my users to use the classname exclude as that works. I do think a setting to exclude an entire code block by classname/ID would be a nice feature as well.

    thanks again!

    Plugin Author Anton Vanyukov

    (@vanyukov)

    @dcooney,

    Yep, that’s what I was referring to. In any case, I would like to see both plugins coexist nicely together. Would it be possible to get a copy of the SEO add-on so I can run some further tests as well? If you could contact me via the contact form here: https://premium.wpmudev.org/contact/, we could discuss the further steps in more detail outside of a support thread. Please put “Attn: Anton” in the subject, so the message is forwarded to me.

    Best regards,
    Anton

    Ok, sent an email.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.