Hello,
I want to show my product images on the archive page in the ratio of 3:4, I managed to do that thanks to this instruction: https://mikeyarce.com/2024/04/how-to-override-woocommerce-image-sizes/
<?php
add_filter( ‘woocommerce_get_image_size_thumbnail’, function( $size ) {
return array(
‘width’ => 600,
‘height’ => 800,
‘crop’ => 1,
);
} );
<?php
add_filter( ‘woocommerce_get_image_size_single’, function( $size ) {
return array(
‘width’ => 750,
‘height’ => 1000,
‘crop’ => 1,
);
} );
However I noticed the image changed to original ratio of 1:1, after clicking the swatch, I want the variable image also appear 3:4, how can I do that? Here is the link: https://wordpress-1481185-5623776.cloudwaysapps.com/shop/
Attached is the screenshot
Attachments:
You must be
logged in to view attached files.