• Resolved Supplement Genie

    (@supplementgenie)


    I am using the Jetpack Lazyload. The lazyload works well but on the product page, the main image does not load and the thumbnails load over where the image should be.

    I put the following code into functions.php:

    function exclude_lazyload_single_product() {
    if ( is_product() ) {
    return false;
    } else {
    return true;
    }
    }
    add_filter( ‘lazyload_is_enabled’, ‘exclude_lazyload_single_product’, 10, 3 );

    It worked great until the last update. Is there something I should do to amend this so that it works properly?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support supernovia

    (@supernovia)

    Hi, so you used to block Lazy Load for product images, and now it’s stopped working, correct?

    Could you clarify in what way it’s no longer working? Is the image not loading, are you getting an error, etc?

    I noticed another alternative function here that you might try, but again it would be helpful to have more information as to what’s going wrong now.

    Plugin Support supernovia

    (@supernovia)

    Oh, also, did you add that via a functions plugin or through some other method?

    Thread Starter Supplement Genie

    (@supplementgenie)

    @supernovia the issue I am having is that, as mentioned above, on the product page, the thumbnails load over the main image.

    I added the above code to the functions.php and that prevented lazyload from initiating on the product page and all images loaded on pagelaod. However, since the last update, this function appears to have been rendered useless and the lazyload activated on product pages which gives me the same issue again as mentioned above.

    that being said, I would rather not need to use anything to block it and be able to use the lazyload on all pages without issue.

    I have taken a screenshot to give you an idea but cannot seem to post it here?

    Plugin Contributor James Huff

    (@macmanx)

    The function suddenly not working is likely related to this bug: https://github.com/Automattic/jetpack/issues/11123

    Would you please see if changing the function’s priority to 99 makes any difference?

    As for Lazyload compatibility, we are aware that it is not yet fully compatible with all third-party themes and plugins, but we are steadily getting there. Currently, switching it off for the problem situation is the best option.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Lazyload on product images’ is closed to new replies.