Disable Product Picture Zoom

Hello there!

I want to disable the effect when I place my mouse on the picture it zooms, how do I do it?

Hi Katarina,

The zoom options are added to the theme support for the WooCommerce single product image by adding this add_theme_support( 'wc-product-gallery-zoom' );.
This article will be helpful to remove that code: https://remicorson.com/disable-woocommerce-3-zoom/ or else you can do that by adding the following code in your child theme.

function remove_image_zoom_support() {
    remove_theme_support( 'wc-product-gallery-zoom' );
}
add_action( 'wp', 'remove_image_zoom_support', 100 );

Remember that the above code will work if copied as it is and don’t conflict with any existing style.
Please note that the code provided serves only as a guide to help you get started custom coding on your own if there’s no option offered in our theme or the products we bundle.
We do not provide support for custom codes that means we can’t fix it in case it conflicts with something in your site nor will we enhance it.

Hope it helps.

1 Like

Hello!

Me scared to edit any CSS or whatever to the site, can you please help me out?

I don’t even know where to put the code

Hey Katarina,

You need to paste the provided code in the child theme’s functions.php file. If you’ve not already setup the child theme then first you need to set it up by following https://theme.co/docs/child-themes

Once the child theme is installed and active, you can find the functions.php file by navigating to Appearance > Theme Editor and in the right hand panel, click on functions.php link (see screenshot)

image

Hope this helps!

1 Like

Hello Nabeel,

Thanks for the reply,

If I put the code that @tristup sent, will it affect the page load speed? Please let me know

Basically what I mean, If I delete that function of “Product Image Zoom” will the page work & load faster?

Kind regards,

Hi Katarina,

By adding this function It does not affect page speed. The page will load faster since you are disabling product zoom JS and CSS files to load so you page speed may increase.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.