Custom Image thumbnail on Single Product page in Woocommerce

woo commerce icon

WooCommerce provides easy and efficient ways to customize product thumbnail sizes on Single Product page. There are three the methods one could utilize in order to set Single Product Image Thumbnail size according to one’s needs.

Method One – You want to show full image

Create a filter in your theme-folder/functions.php file with the following code:

[php]
function custom_product_large_thumbnail_size() {
return ‘shop_large’;
}
add_filter(‘single_product_large_thumbnail_size’, ‘custom_product_large_thumbnail_size’);
[/php]

As far as i know “single_product_large_thumbnail_size” filter accepts two values shop_single and shop_large. By default it uses shop_single (plugins/woocommerce/templates/single-product/product-image.php).

Method Two – If you want thumbnail size anything except full image size changing “Image Options” under WooCommerce > Settings > Catalog tab might help.

Method Three – Copy plugins/woocommerce/templates/single-product/product-image.php to your theme folder, to the following location and make necessary changes (adjust according to your theme name).

wp-themes/yourtheme/woocommerce/single-product/product-image.php. Note that you will need to omit “templates” folder from the actual path.

Do post if you know of a better or additional way to customize product thumbnail sizes on Single Product page in WooCommerce.

Leave a Reply

Your email address will not be published.