I’m having a nightmare with some of the images on my site. I have long rectangular images for some products which keep cropping to 300×300 in the middle of the product.
I want the product archive thumbnails to be square but just scaled down to fit a 300×300 square without any cropping.
I’ve tried the following but it didn’t make a difference:
add_filter( ‘woocommerce_get_image_size_gallery_thumbnail’, function( $size ) {
return array(
‘width’ => 300,
‘height’ => 300,
‘crop’ => 0,
);
} );
Also, the single product page is showing the full image. I take it this is because it’s a long narrow image so I need the same for this i.e. scaled down.
Any help would be really appreciated.
]]>Firstly – THANK you for making this plugin! For the most part, it is perfect! However, I have a slight issue where after I crop the image, it’s totally fine for the Post Archive thumbnail (and has used the new crop), however, when I open the post and have a hero-image / that featured image at the top; it doesn’t apply the crop. It seems that it’s only this feautred image inside the post that hasn’t saved.
Do you have any ideas as to why / how to solve this?
THanks a lot in advance!
]]>add_image_size( ‘index-thumb’, 200, 200, array( ‘center’, ‘center’ ));
I add above line in my functions.php in the twenty sixteen theme, but the image only scales down and no crop. Any ideas what going wrong?
Greetings Tom.
]]>