Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1364989

    Hi,

    Like others, I recently have a problem with the featured product image in Woocommerce. The product image is set to be 450px wide, and uncropped. But now, when I create a new product, and upload a new picture for its featured image, it seems to automatically selects the shop_catalog size (450×450). But when, for this same product, I select an old picture that was already used for another, older, product, it selects the correct thumbnail (uncropped). That is even before saving the product ; I mean that when the media library window pops out, and the product image is loaded in the editor, the square thumbnail appears instead of the uncropped version.
    This only happens with newly uploaded pictures. And yet, I checked, the correct woocommerce thumbnail is generated in the system (I can find it when accessing the uploads folfer through FTP). It seems, for some reason, that when selecting a newlymade product image, the system cannot ‘find’ the yet-generated woommerce thumbails…
    I also tried to edit an old product, and it’s the same thing : whenever I try to upload a new picture, the shop thumbnail is automatically selected ; when I use old, already imported images, it selects the proper woocommerce thumbnail.
    Also, in the single product page front end, the product image is the correct one (uncropped woocommerce thumbnail), and not the square one.

    I have tried the solutions offered in others threads (notably https://kriesi.at/support/topic/bug-in-enfold-for-woocommerce-prduct-images/#post-1362307), to no avail so far. But the problem seems a bit different : for me, the catalog thumbnail, when I selected an old picture for it, was fine. It was only with a new picture that the square thumbnail appears. Hence, in my mind, the problem lies with the woocommerce catalog thumbnail generation…

    Any idea why that behaviour happens ?

    #1365079

    Hey JaimBateman,

    Thank you for the inquiry.

    Have you tried implementing the changes that we suggested in the previous thread?

    // https://kriesi.at/support/topic/bug-in-enfold-for-woocommerce-prduct-images/#post-1363586

    The enfold/config-woocommerce/config.php file has to be modified directly. This will set the thumbnail to the default woocommerce_thumbnail if the woocommerce_thumbnail_image_width option has been adjusted.

    Best regards,
    Ismael

    #1365152

    Hi Ismael,
    Thanks for your help. Sadly, that didn’t work. So I tried different things, and here are a few other elements that might help :
    – when changing to another theme (like Twenty Twenty-Two), and adding a new product, the product image worked as intended, by which I mean that on the product page, when clicking on ‘Define featured image’ and uploading a new picture and selecting it, the proper thumbnail (uncropped) appeared on the page. I then saved the product and switched back to Enfold, and it kept the right uncropped thumbnail. And on the catalog, I could see the right, uncropped thumbnail.
    – So I tried something else. I disabled the shop_catalog image size in my child theme function.php, changed back the woocommerce/config.php file to what it was originnaly, and then retried the whole process ; this time, even with Enfold activated, everything happened as it should – meaning I get my uncropped thumbnail. But if I reinstate the ‘shop_catalog image size, it starts picking it up again and not the woocommerce_thumbnail one.
    And if I select a semi-old picture (one dating from no before the end of August), and the 450×450 pixel file exists on the server, it will get picked up even though the image size ‘shop_catalog’ is still removed. Regenerating the thumbnails and deleting the unused ones makes it work again.

    So it seems that somehow, the existence of the shop_catalog sized image is enough for it to take precedence over any other thumbnail…. Once again, I encourage you to try things out on the website I gave you. It truly baffles me.

    Thanks for your help !

    #1365221

    Hi,

    Thank you for the info.

    But if I reinstate the ‘shop_catalog image size, it starts picking it up again and not the woocommerce_thumbnail one.

    Did you implement the changes in the enfold/config-woocommerce/config.php after reinstating the shop_catalog image size?

    $woocommerce_thumbnail_image_width = get_option( 'woocommerce_thumbnail_image_width' );
    		$default_size = $woocommerce_thumbnail_image_width == 300 ? 'shop_catalog' : 'woocommerce_thumbnail';
    		$size = apply_filters( 'avf_wc_before_shop_loop_item_title_img_size', $default_size );
    

    The theme by default will prioritize the custom shop_catalog (450x450px) thumbnail if the changes above are not implemented. You can also use the filter.

    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';
    }
    

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.