• Resolved pttony

    (@pttony)


    After the latest update, lazy load stopped working on my homepage (works fine on posts). No images are loading on the homepage at all.

    I’ve turned off lazy load and images are working fine. Is there a quirk in the latest update that would effect this? No other changes have been made to my site.

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

Viewing 12 replies - 1 through 12 (of 12 total)
  • I have the same issue on multiple sites. I was told the answer is not to minimize javascript files, but switching off lazy loading of images indeed fixes the problem.

    Plugin Support Georgi Ganchev

    (@georgiganchev)

    Hello @dutchintouch,

    Could you please let us know the name of your website if you are a SiteGround client?

    I was unable to find the source of the issue and the lazyloading works on a website with the newest WordPress version, default Astra theme, and Lazy Load Media activated.

    We will appreciate your insight.

    Best regards,
    Georgi Ganchev
    SiteGround.com

    Hi Georgi, the sites affected are:
    dutchamsterdam.nl

    visitblanes.com

    cultexperts.org

    cultdefinition.com

    apologeticsindex.org

    Since about a week I noticed that from time to time images did not display. Any images, not just featured ones. They returned if and when I purged the caches manually (even though I have automatic purging switched on).

    In addition the menu on one site – visitblanes.com – did not display on mobile until I turned off “minify javascript” on that site.

    So, on each of the above sites I now have “lazy load media” switched off. I only just did that 10-15 minutes ago, so perhaps too early to tell whether or not the images will now continue to display.

    These sites all use the Schema theme by MTS (MyThemeShop).

    Thanks for looking into this.

    Kind regards,
    Anton

    Thread Starter pttony

    (@pttony)

    FYI – I’m a siteground client.

    My site is using the latest WP and Astra theme.

    FWIW: lazy load works fine on another site of mine (same basic set-up): https://www.i-i-p-e.org/ (lazy load enabled and “minify javascript” enabled.

    On the peace-ed-campaign.org website I just experimented by turning off “minify javascript” and then re-enabled “lazy load” – the images are now working on the homepage.

    So its working now… but there are definitely site specific variables and/or plugin conflicts that are causing the issue on peace-ed-campaign.org. Are there any known plugin conflicts that might be causing this? Other settings I should consider adjusting?

    Plugin Support Georgi Ganchev

    (@georgiganchev)

    Hello @dutchintouch,

    I investigated the case and all of the reported websites have their images displayed properly even when the Lazy Load Media is activated. No issues as the one reported in the initial thread are experienced hence the problems you mentioned are not related to the new WordPress version and the way the plugin lazy loads images.

    I would recommend you to enable these and when you encounter the problem with images not showing open a HelpDesk request from your SiteGround Client Area so we can investigate while the problem is still happening.

    @pttony

    I was able to inspect the issue and it appears that the images are not being lazyloaded lack the data-srcset HTML attribute.

    The Lazy Load feature uses the data-srcset HTML attribute, which is always assigned by the WordPress application. However, if the default HTML is modified by a specific plugin or the theme, the expected result could not be met.

    I have tested your website and noticed that the data-src attributes are missing. I installed a brand new Astra theme on a new website and images there have the data-srcset attribute which excludes a conflict between the theme and the Speed Optimizer plugin.

    I would recommend checking with your developers why the required attributes are missing. You can also switch the theme or inspect the plugins if specific page builders have been used.

    We have not received any additional reports from Astra users experiencing this issue. In addition, there are no reports about plugin conflicts that we know are causing such behavior.

    If needed please open a new HelpDesk request from your SiteGround Client Area and we can investigate the case further.

    Best regards,
    Georgi Ganchev
    SiteGround.com

    Thread Starter pttony

    (@pttony)

    Thanks Georgi,

    That’s very odd. I’m the “developer” and I’m not aware of any plugin that might overwrite the default html.

    Can I ask when you inspected the site? I turned lazy-load back on maybe an hour ago.

    @georgiganchev

    Alright, I just switched on Lazy Load at cultdefinition.com, then did a purge. The 3 images show on the page on desktop. However, they immediately disappeared on mobile view.

    Same story with DutchAmsterdam.nl. In addition, on mobile with those settings switched on, the Jetpack Cookies banner keeps popping up on each page (and on each refresh of that page).

    Previously, on the sites mentioned, if and when the images disappeared (on desktop and/or mobile), a purge brought them back — only to disappear again (on desktop and/or mobile) sometime later.

    Plugin Support Georgi Ganchev

    (@georgiganchev)

    @pttony

    Indeed the data-src is now present when I inspect the images on your page. My initial tests were observation when I turned the lazy load to observe the reported issue when the thread was posted. Then I had to inspect the other websites reported in order to verify if the cases are the same which would have surely be some conflict which I can’t confirm as of this time.

    If you can check the script handles for the minified JS files, the problematic one can be excluded from the minification using this custom filter.

    add_filter( ‘sgo_js_minify_exclude’, ‘js_minify_exclude’ );
    function js_minify_exclude( $exclude_list ) {
    $exclude_list[] = ‘script-handle’;
    $exclude_list[] = ‘script-handle-2’;

    return $exclude_list;
    }

    This should allow for the usage of both LazyLoad and Minify JS.

    Best regards,
    Georgi Ganchev
    SiteGround.com

    Thread Starter pttony

    (@pttony)

    Thanks!

    Sorry I’m a bit of a nice here.. but how do I:

    1. check the script handles to find problematic ones…
    2. where would I add the custom filter?
    Plugin Support Dimo Dimov

    (@dimodi)

    The custom filters are added to the functions.php file of the currently active theme. For more information on how to properly exclude certain script/s and to find its handle, please check the following thread:

    https://www.ads-software.com/support/topic/how-to-use-sg-optimizers-filters-procedure/

    Regards,
    Dimo

    All,

    Our two-cents worth … depending on the plugins or theme you’re using, minifying CSS, JS, or HTML files using Speed Optimizer may not be a best choice.

    Details: https://www.ads-software.com/support/topic/notice-for-avada-users-cs-js-html-minification/

    Most files provided by plugins, themes, etc. are already minified so applying another minification layer can be counter-productive.

    We have disabled Speed Optimizer’s minification features and have experienced no issues. In fact, our SEO and Speed Scores actually went up.

    Note: Speed Optimizer is a great tool and helps in many other areas.

    Cheers! ??

    Plugin Support Gergana Petrova

    (@gpetrova)

    Hello @dutchintouch,

    Since we haven’t heard back from you for a while, we will mark the topic here as Resolved. You will still be able to post an update, if needed.

    As recommended by my colleague, however, should the issue reoccur the best course of action would be to contact us from your SiteGround’s Client Area before performing any changes on your end so we’ll have the required access to investigate the case in more details at the same time that it is present on the affected site.

    @pttony, if you’re experiencing issues with the modification of the functions.php file or with the identification of the handles to be included in the filter – you’re also welcome to contact us from your Client Area directly, where our team will be able to assist further.

    Best Regards,
    Gergana Petrova

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘lazy load not working on home page’ is closed to new replies.