Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1361748

    Hi!

    After upgrading to the latest version (not sure what version we had pre-upgrade, but it was a while ago), the product thumbnail images are not displaying correctly in our shop. The problem is odd, some images are shown in the correct ration (we have WooCommerce images set to display as uncropped in Appearance > Customize > WooCommerce > Product) while other products uses the cropped image, eg. 450×450 px. Many of the products are several years old and they have the correct uncropped image versions and have been displaying correctly pre-upgrade. Other products, just as old, are still displaying correctly.

    We are using a child theme, but changing to the vanilla Enfold theme did not help. Only when switching to another theme (twenty twenty) the product images are all displayed uncropped as expected.

    We have also tried switching to the “WooCommerce 3.0 product gallery” in the Enfold settings, but the problem persists and we switched back.

    Let me know what more you need to know.

    Thank you,
    Martin

    #1361753

    Hey Martin,

    Thank you for the inquiry.

    Did you register a custom thumbnail that is 174x245px in size? We would like to adjust the product thumbnail settings but we don’t want to change anything in the live site. Is there a staging version of the site where we can do the tests?

    Best regards,
    Ismael

    #1361782

    Hi Ismael,

    No, not 174×245 px. The woocommerce_thumbnail has been set to 173 and i tried changing that to 174 and then uploading one of the product images that is currently displaying incorrectly. A 174×238 image was generated but then it still displays the product thumbnail using 450×450.

    The uncropped registered image sizes are currently (after changing 173 to 174 in the Appearance > Customize > WooCommerce > Product):

    • medium – 300 x 300
    • medium_large – 768 x 9999
    • large – 1030 x 1030
    • product-image-mini – 50 x 0
    • 1536×1536 – 1536 x 1536
    • 2048×2048 – 2048 x 2048
    • extra_large – 1500 x 1500
    • masonry – 705 x 705
    • shop_single – 450 x 999
    • shop-hi-res – 320 x 470
    • double-full-width – 2420 x 0
    • woocommerce_thumbnail – 174 x 0
    • woocommerce_single – 450 x 0

    And all the generated images with the current setting are (including cropped images):

    • omslag-suburbanweekend-resized-100×100.jpeg
    • omslag-suburbanweekend-resized-1096×1500.jpeg
    • omslag-suburbanweekend-resized-1123×423.jpeg
    • omslag-suburbanweekend-resized-1123×430.jpeg
    • omslag-suburbanweekend-resized-1123×630.jpeg
    • omslag-suburbanweekend-resized-120×120.jpeg
    • omslag-suburbanweekend-resized-174×238.jpeg
    • omslag-suburbanweekend-resized-180×180.jpeg
    • omslag-suburbanweekend-resized-219×300.jpeg
    • omslag-suburbanweekend-resized-260×185.jpeg
    • omslag-suburbanweekend-resized-301×301.jpeg
    • omslag-suburbanweekend-resized-320×438.jpeg
    • omslag-suburbanweekend-resized-36×36.jpeg
    • omslag-suburbanweekend-resized-450×450.jpeg
    • omslag-suburbanweekend-resized-450×616.jpeg
    • omslag-suburbanweekend-resized-495×400.jpeg
    • omslag-suburbanweekend-resized-500×225.jpeg
    • omslag-suburbanweekend-resized-50×68.jpeg
    • omslag-suburbanweekend-resized-515×705.jpeg
    • omslag-suburbanweekend-resized-710×375.jpeg
    • omslag-suburbanweekend-resized-753×1030.jpeg
    • omslag-suburbanweekend-resized-80×80.jpeg
    • omslag-suburbanweekend-resized-845×321.jpeg
    • omslag-suburbanweekend-resized-845×684.jpeg
    • omslag-suburbanweekend-resized.jpeg

    Sorry, we do not have a staging site but I have a local installation and can do tests if you want to.

    Best regards
    Martin

    #1361834

    Hello. I hope that is okay, to post here… I seem to have the same issue amongst an issue also with price not showing on variable products on the product page… just thought I’ll post the link here in case of different support responding to issues.

    Woocommerce Problems — Image Size and Price with Variations

    Thanks,
    Corina

    #1362021

    Hi,

    Yes Corina, it sounds just like the same issue I’m having. Have seen others also reporting it today.

    Ismael or someone else at Enfold, I tried to understand why the problem is not consistent but why we get mixed cropped and uncropped images. It looks to me like the cropped version is displayed if a 450×450 version of the image has been generated, otherwise the image is displayed uncropped.

    I wrote a short snippet of code that works for me:

    add_filter( 'avf_wc_before_shop_loop_item_title_img_size', 'temp_thumbnail_size_fix', 10, 1 );
    
    function temp_thumbnail_size_fix( $thumbnail_size ) {
        return 'woocommerce_thumbnail';
    }

    But there is apparently a bug in Enfold when it comes to using the settings from Appearance > Customize > WooCommerce > Product Images so please let a developer have a look at this.

    #1362027

    Hi!


    @martin_e83
    : Thank you for providing a working solution. Please keep it for now until we figure out the issue. Looks like the theme overrides the woocommerce_get_product_thumbnail function which renders the product thumbnails using woocommerce_thumbnail as the default size. The override is located in the enfold/config-woocommerce/config.php > avia_woocommerce_thumbnail, which uses the shop_catalog as the default thumbnail size. This is why the size of the thumbnail is 450x450px.


    @cd2s
    : Please use the snippet that @Martin provided above to revert the product thumbnail size to default.

    // https://kriesi.at/support/topic/woocommerce-product-images-not-displaying-correctly/#post-1362021

    Best regards,
    Ismael

    #1362037

    Hello @martin_e83 & @Ismael

    Thanks so much. Worked perfectly.
    Appreciate your help.

    Kindest, Corina

    #1362299

    Hi,
    Glad to hear that this has been sorted out, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘WooCommerce product images not displaying correctly’ is closed to new replies.