Tagged: customizer, Images, thumbnail, woocommerce
-
AuthorPosts
-
October 20, 2022 at 11:01 am #1369559
Dear Support, I am facing a serious problem with WooCommerce Image Sizes on various pages with Enfold (different versions, greater than 5.1) and WooCommerce (different versions, greater than 6.8) installed. Today I updated one page to Enfold 5.2 and WooCommerce 7.0, hoping that the lastest versions could help in solving the issue but it remains.
I want the images in the product catalog to be uncropped. Setting in the Customizer WooCommerce Tab is:
Thumbnail width: 300
UncroppedOlder products are shown in the right way. If I add new products a strange cropped 450 x 450 px image size is loaded and saved. I can see it directly in the editing screen of the product. On older products I see the uncropped 300 x whatsoever px images size (“medium”) in the sidebar. On the newer products I see the square 450 x 450 px image …
I already changed the settings. Created new thumbnails a lot of times. But still the wrong size is loaded and saved for the new products.
The strangest thing: In the product grid ALB element the correct uncropped “medium” image is loaded. Even with the square 450 x 450 shown in the backend. But on the shop overview page and in the upsell/crossell sections it displays the wrong cropped size despite the settings in the Customizer.
I need your help since the shop pages look weird and I need a solution for this problem! Can I somehow deactivate the 450 x 450 image size completly? How is the image size saved? Do you have any ideas?
Thanks in advance!!
Best regards, Daniel
October 21, 2022 at 8:59 am #1369691Hey spooniverse,
Thank you for the inquiry.
You may need to add this filter in the functions.php file to disable the default thumbnail (shop_catalogue) and revert the images back to use the dynamic thumbnail based on the Woocommerce > Product Images settings.
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'; }
Best regards,
Ismael`October 24, 2022 at 10:58 am #1369948Hi Ismael,
thank you for your code. It does the trick! Everything looks fine in the frontend now. Need to add it to my other shop pages.
In the backend however you can still see the different image sizes the products originally refer to (see image in private) while your filter loads the correct size for the frontend. Nothing to worry about, or am I wrong?
All the best, Daniel
October 25, 2022 at 11:06 am #1370124Hi,
Glad to know that the filter is working. The screenshot doesn’t load on our end though. You can use imgur, savvyify or dropbox for the screenshot instead. Thanks.
Best regards,
IsmaelOctober 25, 2022 at 11:11 am #1370125Sorry. Can see it on all devices. Added a new link (works for 3 days). Thanks for taking a look!
October 28, 2022 at 10:26 am #1370526 -
AuthorPosts
- The topic ‘Problem with WooCommerce Image Sizes’ is closed to new replies.