Maintain The Product Image Gallery For All Products

When you install WooThumbs, you might notice that the product gallery disappears when you select a variation. This is intentional, as WooThumbs focusses the images to be specific to the selected variation.

However, this isn’t always suitable. As such, you can choose to “Maintain the Product Gallery” per-product in the WooThumbs tab when editing a product.

Maintain gallery checkbox

Doing so will keep the parent product’s image gallery when a variation is selected (minus the featured/main product image).

But what if you want to turn it on by default for all products? For that, you can add the following code to your child theme’s functions.php file.

 * Maintain gallery for all products.
function iconic_woothumbs_maintain_gallery( $value, $product_id, $setting, $settings ) {
    if ( $setting !== 'maintain_product_gallery' ) {
        return $value;

    return true;

add_filter( 'iconic_woothumbs_get_product_setting', 'iconic_woothumbs_maintain_gallery', 10, 4 );

Are you using WooThumbs for WooCommerce yet?

Start your 14-day free trial right now and get instant access to the features described in this article.

or learn more

Was this helpful?

Please let us know if this article was useful. It is the best way to ensure our documentation is as helpful as possible.

WooThumbs for WooCommerce

WooThumbs for WooCommerce

Not got the plugin yet? Get instant access right now, free for 14 days.

or learn more

Still need help?

If you haven't found what you're looking for in our documentation, please contact support.

Get Support