Exclude LazyLoad for Main Product Image on Single Product Page

This topic has 8 replies, 2 voices, and was last updated 2 weeks, 2 days ago ago by Kestutis

  • Avatar: Kestutis
    Kestutis
    Participant
    June 18, 2025 at 10:15

    Hello,

    I’m currently using WP Rocket for performance optimization and XStore for my WooCommerce theme.

    I want to exclude the main product image from lazy loading on single product pages only, in order to improve the Largest Contentful Paint (LCP) metric.

    The image in question is rendered with the following structure:
    img width=”430″ height=”505″ src=”…” class=”attachment-woocommerce_single size-woocommerce_single wp-post-image” … loading=”lazy”
    I’ve tried adding the following keywords under LazyLoad → Excluded images or iframes in WP Rocket:
    wp-post-image
    woocommerce_single
    attachment-woocommerce_single
    etheme-single-main

    However, the loading=”lazy” attribute is still being applied.

    Ideally, I want to keep LazyLoad for all other images site-wide, but completely exclude it only for the main product image on single product pages.

    Could you advise the proper method or hook/filter to make this exclusion specific to single product pages only?

    Thank you!

    Please, contact administrator
    for this information.
    7 Answers
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    June 18, 2025 at 11:36

    Dear @Kestutis,

    We hope this message finds you well.

    Unfortunately, we are currently unable to access your website due to a fatal error. To assist in resolving this issue, we kindly recommend enabling the following option in your Theme Options under Speed Optimization: “Disable native WordPress lazy loading.”

    Once this setting is activated, please check your website again to see if the issue persists.

    Should you require any further assistance, please do not hesitate to contact us.

    Best regards,
    The 8Theme Team

    Avatar: Kestutis
    Kestutis
    Participant
    June 18, 2025 at 11:39

    I’ve fixed the fatal error you can connect. I’ve already tried what you’ve asked for

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    June 18, 2025 at 11:45

    Hello @Kestutis
    If you activated such option then “lazyload” param will not be shown in your images. Please, clear your cache and check now.
    Kind regards, Jack Richardson
    The 8theme’s team

    Avatar: Kestutis
    Kestutis
    Participant
    June 18, 2025 at 11:48

    I disabled lazyload where you said. I’ve cleared the cache.
    I added the classes to WP Rocket and lazyload shows up anyway in the product. 😀

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    June 18, 2025 at 11:50

    Hello @Kestutis
    Please, check private content and if you still see the issue, provide us the URL of such product (you can add URL in private content)
    Kind regards, Jack Richardson
    The 8theme’s team

    Please contact administrator
    for this information.
    Avatar: Kestutis
    Kestutis
    Participant
    June 18, 2025 at 11:53

    Very thanks

    Avatar: Kestutis
    Kestutis
    Participant
    June 18, 2025 at 11:53

    Thanks for the support! My topic “Exclude LazyLoad for Main Product Image on Single Product Page” has been successfully resolved.

  • Viewing 8 results - 1 through 8 (of 8 total)

The issue related to '‘Exclude LazyLoad for Main Product Image on Single Product Page’' has been successfully resolved, and the topic is now closed for further responses

Helpful Topics

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.