Is XStore rendering ALL variation galleries regardless of WooCommerce AJAX threshold?

This topic has 2 replies, 2 voices, and was last updated 1 day, 2 hours ago ago by Jack Richardson

  • Avatar: Safe Desires
    Safe Desires
    Participant
    May 26, 2026 at 19:31

    I’m trying to optimize mobile Core Web Vitals/PageSpeed on my WooCommerce product pages, and I discovered that XStore appears to preload/render ALL variation gallery images into the initial HTML output.

    On variable products with multiple color variations, the page source contains:

    all variation gallery thumbnails
    all swiper slides
    all zoom/photoswipe elements
    all srcset image variants

    for every variation before the customer selects a variation.

    This creates:

    very large DOM size
    excessive swiper/lightbox initialization
    delayed LCP discovery
    high mobile INP/TBT

    Example:
    The product gallery outputs all BLACK / BLUE / RED variation galleries immediately inside the swiper thumbnails container instead of loading only the default/current variation gallery.

    Questions:

    Is there a setting, filter, or optimization to load ONLY the selected/default variation gallery on initial page load?
    Can non-selected variation galleries be loaded dynamically via AJAX after variation selection?
    Is there a way to disable/prevent preloading of all variation gallery thumbnails/slides?
    Is there a mobile optimization mode to reduce swiper/gallery DOM size?
    Is there a recommended way to disable PhotoSwipe/zoom/swiper initialization for non-visible variation images?

    I already:

    optimized/compressed images
    use WebP
    use Perfmatters lazy loading exclusions
    enabled WooCommerce AJAX variation threshold

    But the bottleneck appears to be the initial gallery HTML/DOM generated by XStore itself.

    Any recommended filters, hooks, custom snippets, or theme settings would be greatly appreciated.
    The current LCP is taking 28 seconds to load
    https://pagespeed.web.dev/analysis/https-safedesires-com-product-plunge-lace-babydoll/lfrdh88p6o?form_factor=mobile

    Content is visible for topic creator and
    support staff only.
    Files is visible for topic creator and
    support staff only.
    1 Answer
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    May 27, 2026 at 09:13

    Hello @Safe Desires,

    The images from variations are not loaded until a variation is selected. In your case, these images are loaded because you have added all of them to your default gallery (https://gyazo.com/99b002a71401e76fb457b045439525fe). As a result, all images are loaded when the page loads. Since you have a predefined default variation — Red XS-S (https://gyazo.com/0bf897c3db36b1029d7afd8dabb6b8ab) — the current default gallery is then replaced with the variation gallery defined in your settings (https://gyazo.com/3a0721e63cc657fa7203a94fce7703a7) on page load (that makes 2 times gallery to load, default and variation one).

    You can either remove the preselected variation and check again, or include only the necessary images in your default gallery to prevent all items from loading initially.

    PhotoSwipe initializes all images to display the carousel, and it is not possible to manually initialize only a few images and then attach others, as the carousel popup must contain all visible items.

    The heaviest element on your single product page is the video, as shown in the page source (https://gyazo.com/8295a6bc6e32657445881ac5d4df7504). To improve loading time, you may consider temporarily removing this video from the single product page gallery items and placing it in a separate content section with a lazy-load configuration (https://gyazo.com/021cf9185373aeb88c32462a321706ab).

    Best regards,
    Jack Richardson
    The 8Theme’s Team

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

You must be logged in to reply to this topic.Log in/Sign up

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