[Smush] Lazy Load Issues

I have some problems on my site when I try to enable the Lazy Load Feature. Some images stop loading after about five images. The rest disappear on the properties page, can you help me?

  • Adam
    • Support Gorilla

    Hello Michael

    I hope you’re well today!

    I checked the site and it seems it’s related to the Flex slider (it’s a jQuery slider) implementation on the site – which, I believe, is a part of the WPL PRO plugin. Both this slider and the Lazy Load feature are making a heavy use of JavaScript (jQuery to be exact) and apparently there’s some “conflict” between them.

    There’s no related errors in the console, images are replaced by their CDN-hosted copies as expected but at some point during the slide changes the “lazy load” scripts seem to be not executed anymore. Unfortunately, there’s also no settings whatsoever that would let you/us affect the way that slider scripts are working/executed, apart form just changing the Animation type (on “Apearance -> WPL Settings -> Flex slider” page).

    I didn’t play with that option (though it might be worth to check if it’s related so you might want to give it a try) but even if so – that would also mean changing the way the slider appears/works on the site. So I left it untouched.

    I think the simplest solution here would be to actually exclude these images from Lazy Load. I have added a relevant class already to exclusions on “Smush -> Lazy Load” page and that seems to do the trick: all the images are displayed while lazy load is still active.

    Best regards,

    Adam

  • Michael
    • New Recruit

    Hi Adam,

    Smush still seems to be causing a problem with pics loading on listings pages in slide show, even with css class exclusions. Like on this page: https://spectrumlistings.com/properties-2/13063-140-Roxy-Cahoon-Rd-Plymouth-Massachusetts-02360-72311375/

    Also, smush keeps agent pics from loading as well on agent pages likes this one:

    https://spectrumlistings.com/real-estate-agents-plymouth-ma/

    If I turn Smush off, the issues are resolved. Any help here would be great. Thanks!

  • Adam
    • Support Gorilla

    Hi Michael

    Thank you for response!

    I checked the site again and did some small adjustments to Lazy Load configuration in Smush.

    As for the property pages, I’ve added additional class “.wpl_gallery_image” to exclusions so Lazy Load is not applied to those slider images. They are still served from CDN but without Smush Lazy Load feature.

    I checked the page that you shared and some other property pages and it looks like now all the images in all these sliders are visible.

    As for agents’ pages, it’s a bit different.

    It doesn’t seem to be using any JS that could be conflicting but apparently the img HTML tag markup generated by the WPL plugin there is a bit “messed”. That makes it impossible to be properly parsed by Lazy Load scripts, thus images are gone. But the “tricky” part is that these images don’t have any specific classes or IDs that would let us disable Lazy Load just for them.

    I looked for alternate solution but in the end I had to disable Lazy Load for this specific pages entirely – by adding agents’ pages to URL exclusions in Lazy Load settings. The images are now showing up.

    To sum it up:

    – images are loaded from Smush CDN

    – they are loaded using Lazy Load except the slider on property pages and from entire “agents” pages.

    Best regards,

    Adam