Custom Image Sizes Problem
-
Hello guys!
Faced a very strange problem. I use custom image sizes for product thumbnails in shop archive and single product, I set them through filters
single_product_archive_thumbnail_size,woocommerce_gallery_thumbnail_size,woocommerce_gallery_image_size.Everything worked fine, but recently, possibly after the last WooCommerce update, these thumbnail sizes don’t apply to the shop archive/product page.
But this is only a small part of my problem. WooCommerce cleans up the meta information of all product-related images, their meta [sizes] part. This happens right after any interaction with products. For example:
-> I have a shop archive with fully working images
-> I click Add to Cart
-> refreshing the page
-> all images on the page have their [sizes] meta removed and reset to their default ‘full’ size.I traced the chain of actions and it points to the
WC_Regenerate_Imagesclass inside WooCommerce, to themaybe_resize_imagemethod.I am an author on ThemeForest, and have checked several dozen of my premium themes, all of them have this bug. Can you advise me what the problem might be and how I can debug this? (by the way, on the standard twentytwenty theme, this problem also arises after I added custom image sizes there)
Thank you for your time and attention!
Regards, Alex
The topic ‘Custom Image Sizes Problem’ is closed to new replies.