Skip to main content
Login Join
Snippet · PHP

Disable WooCommerce Product Image Zoom

Shared by Amit Dholiya · August 11, 2026 · @after_setup_theme

10 views
1 upvote
Back to Snippets

WooCommerce adds a zoom effect to product images by default. If you prefer a simpler product gallery or your theme already provides its own image behavior, you can disable the built-in zoom feature.

Steps

  1. Open your theme’s functions.php file.
  2. Add the code below.
  3. Save the file.
  4. Clear your website cache and refresh the product page.

Done — the WooCommerce product image zoom feature will be disabled.

function disable_woocommerce_image_zoom() {
    remove_theme_support( 'wc-product-gallery-zoom' );
}

add_action(
    'after_setup_theme',
    'disable_woocommerce_image_zoom',
    100
);
Know a different way to do this? Add your approach as a variation so folks can compare them side by side.
Submit a variation

0 comments