• Resolved webdevwalton

    (@webdevwalton)


    Hi there,

    I’ve got a website in development for a client, and I’m using the SG optimizer plugin.

    I’ve activated lazyload, and confirmed the correct class is being added to the element ect., but Google Page Speed Insights is suggesting that nothing is being lazy loaded on mobile.

    Any ideas?

    Thanks

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter webdevwalton

    (@webdevwalton)

    I’ve also just noticed that the images aren’t in the correct ‘WebP’ format. Any ideas there?

    Plugin Support Dimitar Petrov

    (@demiro)

    Hello @webdevwalton,

    I checked your website and noticed that not all of the images have data-src* HTML attributes which are required for the Lazy Load features of the browsers. Google Page Speed reports the exact images having these issues. I would recommend checking how these images are added to the posts and if they are not modified by the theme or a custom builder.

    Regarding the WebP images, please open the browser’s network tab and refresh the website. Most of the images are served correctly, the WebP files are fetched. There are specific images uploaded in custom directory(/media) that are not generated in WebP. Note that the feature of the plugin works only with images uploaded via the Media Library of WordPress as the meta data is correctly generated in the database for them. Revise the way these images are uploaded and if required, re-upload them via the Media section of the application.

    Best Regards,
    Dimitar Petrov

    Thread Starter webdevwalton

    (@webdevwalton)

    Hi Dimitar,

    Thanks for your response.

    I haven’t added the img elements in any non-standard way. They’re standard img elements with a few classes.

    Any ideas why it would strip out the necessary data-src attribute?

    Thanks

    Plugin Support Plamen M

    (@plamenm)

    Hello @webdevwalton ,

    This is typical behavior in some plugins or even some themes. Your best bet here is to discuss this further with your site developer. They know your site setup best and should know if any of your existing plugins or themes might be stripping the data-src* HTML attributes.

    Regards,
    Plamen.M
    Tech Support Team
    SiteGround.com

    Thread Starter webdevwalton

    (@webdevwalton)

    Hi Plamen,

    I am the website developer, haha.

    I’ve only a few plugins installed, and implemeneted the img elements in a standard way. This is why I’m confused as to the behaviour of the lazyload..

    Thanks,
    Alex

    Plugin Support Dimitar Petrov

    (@demiro)

    Alex,

    I have checked the Google Page Speed report once again and noticed that the images without the required data-src attribute are located at the main top menu of your website.

    Please note that the HTML attribute in question is assigned by the WordPress application by default. Our plugin uses this data attribute for the LazyLoad mechanics. If the attribute is missing, the image is not ‘lazy-loaded’.

    You should check these images and how the HTML code for them(including the menu) is generated. If the menu is controlled by the theme or a plugin, you can contact the developers of the product for further investigation.

    Best Regards,
    Dimitar

    Thread Starter webdevwalton

    (@webdevwalton)

    Hi Dimitar,

    Thanks for this. Noticed that my images being added via PHP’s sprintf function aren’t getitng lazy loading applied to them.

    Is there a technical reason as to why this could be the case?

    Thanks,
    Alex

    Plugin Support Plamen M

    (@plamenm)

    Hello Alex,

    There is nothing immediate that comes to mind. This function should also allow the classes to be assigned to the images, if coded in the function properly. This seems to be all a coding issue and not something specific to our plugin.

    Regards,
    Plamen.M
    Tech Support Team
    SiteGround.com

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Lazy Load Not Working On Mobile’ is closed to new replies.