0

I've built a theme and have set the following image dimensions via functions.php:

set_post_thumbnail_size( 1064, 347, true ); // Upload @ 2128(W) x 708(H)
add_image_size( 'standard', 352, 235, true ); // Upload @ 704(W) x 470(H)
add_image_size( 'gallery', 750, 500, true ); // Upload @ 1500(W) x 1000(H)

I use this script to push out 2 versions of the image for retina displays.

I would like to use the image size 'standard' for my catalog images and 'gallery' for the single product image.

Is there a way to disable the WooCommerce image sizes via functions.php and use the ones I have already created?

I've tried customising the image sizes via Settings > Products, but it doesn't work with the retina script I'm using.

2

You have to use single_product_large_thumbnail_size filter for Single Product page.

something like:

function custom_product_large_thumbnail_size()  {
    return 'gallery';
}
add_filter('single_product_large_thumbnail_size', 'custom_product_large_thumbnail_size');
-1

You have to regenerate all the images with the specified sizes and for that you can use Regenerate Thumbnails plugin from wordpress. you can download it from http://wordpress.org/plugins/regenerate-thumbnails/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.