Tagged: product images, thumbnails, woocommerce
I have stripped down a clone of my live site to just have two themes and Woocommerce installed.
I have Woocommerce setup to show the original format of the product images and this works fine if I use a different theme than Enfold.
When I activate Enfold the product images are cropped and squared – like there is some setting or internal code in Enfold that overwrites the Woocommerce settings for thumbnails.
Woocommerce thumbnail setup – see it here
Product image cropped and squared on “Edit Product” screen with Enfold active –
Image is shown in same way on shop page – see it here
Correctly formatted product image on “Edit Product” screen with Twentysixteen theme active –
Hope someone can help my solve this issue.
Kind regards
Dennis
Hey ProSEO,
I added this to your functions.php file in Appearance ▸ Editor:
add_filter( 'avf_wc_before_shop_loop_item_title_img_size', 'avf_wc_before_shop_loop_item_title_img_size_mod', 10, 1 );
function avf_wc_before_shop_loop_item_title_img_size_mod( $thumbnail_size ) {
return 'woocommerce_thumbnail';
}
and it solved your webshop
and the Related products:
Best regards,
Mike
That is great!!
Thank you soo much :-)
I have added the filter to my child theme on the live site and it solved the issues on the shoppage.
However on the “Edit Product” screen under Featured image the image still shows a cropped version – this is however of lessor importance :-)
Kind regards
Dennis B
Hi,
Glad that this helps, the backend Featured image thumbnail is a WordPress function and I don’t know how to change this. But as you pointed out your customers won’t see this. Shall we close this thread then?
Best regards,
Mike
Yes, please close thread as Solved :-)
Hi,
Thanks for the update. Please open a new thread if you should have any further questions or problems.
Best regards,
Rikard