1. Home
  2. Help Center
  3. WooCommerce
  4. Shop
  5. Product thumbnail size bug

There is a bug in the WooCommerce plugin and it doesn’t save the values after doing changes in the customizer Appearance > Customize > WooCommerce > Product Images

It has been reported https://github.com/woocommerce/woocommerce/issues/30260 but it can take a while to get fixed.

However, it’s possible to force the values using a filter. Add this snippet to wp-content/themes/goya-child/functions.php

// Set WooCommerce thumbnail size add_filter( 'woocommerce_get_image_size_thumbnail', function( $size ) { return array( 'width' => 450, 'height' => 450, 'crop' => 1, ); } );
Code language: PHP (php)

The above code indicates that the thumbnails will be cropped to 450x450px, a square crop. But you can use your preferred values for width and height.

Was this article helpful?

Related Articles