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
- Open your theme’s
functions.phpfile. - Add the code below.
- Save the file.
- 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
);