Website Building » WooCommerce » How Do I Change the Thumbnail of a Gallery in WooCommerce?

How Do I Change the Thumbnail of a Gallery in WooCommerce?

Last updated on October 1, 2022 @ 5:21 am

You can change the thumbnail image for a WooCommerce product gallery using the add_image_size function. This function allows you to specify the dimensions for a new image size, and then you can use this image size when adding images to your product gallery.

To change the thumbnail image size for a WooCommerce product gallery, you will need to edit your theme’s functions.php file. Add the following code to your functions.php file, replacing the width and height values with your desired dimensions:

add_image_size( 'thumbnail-name', 400, 300 );

Once you have added this code to your functions.php file, you need to regenerate your thumbnails. You can do this using a plugin like Regenerate Thumbnails. Once your thumbnails have been regenerated, you will see the new thumbnail image size in your product gallery.

How Do I Change the Thumbnail of a Gallery in WooCommerce?

You can change the thumbnail image for a WooCommerce product gallery using the add_image_size function.

This function allows you to specify the dimensions for a new image size, and then you can use this image size when adding images to your product gallery.

To change the thumbnail image size for a WooCommerce product gallery, you will need to edit your theme’s functions.php file, replacing the width and height values with your desired dimensions:

add_image_size( 'thumbnail-name', 400, 300 );

Once you have added this code to your functions.

Madison Geldart

Madison Geldart

Cloud infrastructure engineer and tech mess solver.