Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1475322

    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 – see product image here
    Image is shown in same way on shop page – see it here

    Correctly formatted product image on “Edit Product” screen with Twentysixteen theme active – see correctly formatted product image here

    Hope someone can help my solve this issue.

    Kind regards
    Dennis

    • This topic was modified 1 month ago by ProSEO. Reason: Missing image
    • This topic was modified 1 month ago by ProSEO.
    • This topic was modified 1 month ago by ProSEO.
    #1475374

    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
    Screen Shot 2025 01 19 at 9.08.36 AM
    and the Related products:
    Screen Shot 2025 01 19 at 9.20.52 AM

    Best regards,
    Mike

    #1475383

    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

    #1475387

    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

    #1475565

    Yes, please close thread as Solved :-)

    #1475589

    Hi,

    Thanks for the update. Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Enfold forces Woocommerce product images to be cropped and square’ is closed to new replies.