Title: Custom Image Sizes Problem
Last modified: November 1, 2021

---

# Custom Image Sizes Problem

 *  Resolved [Alexander Poslushnyak](https://wordpress.org/support/users/alexjkstudio/)
 * (@alexjkstudio)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/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_Images` class
   inside WooCommerce, to the `maybe_resize_image` method.
 * 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

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [3 Sons Development](https://wordpress.org/support/users/3sonsdevelopment/)
 * (@3sonsdevelopment)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/custom-image-sizes-problem/#post-15061908)
 * Hi [@alexjkstudio](https://wordpress.org/support/users/alexjkstudio/),
 * Thanks for reaching out. For development related questions like this, I would
   suggest asking in the Slack Community or on Facebook. Those are generally the
   best places to ask about code.
 * Also, make sure to include the code you’re using to generate the images and apply
   them to the site. That way the other developers can see if they can spot anything
   off in the code.
 * I took a quick look through open issues on GitHub and I don’t see anything that
   appears to be related. You could check there as well and see if you can spot 
   any.
 * [https://github.com/woocommerce/woocommerce/issues](https://github.com/woocommerce/woocommerce/issues)
    - WooCommerce Slack Community: [https://woocommerce.com/community-slack/](https://woocommerce.com/community-slack/)
    - WooCommerce Community group on Facebook: [https://www.facebook.com/groups/advanced.woocommerce/](https://www.facebook.com/groups/advanced.woocommerce/)
 * I hope those get you pointed to a solution.
 * Cheers!
 *  [MayKato](https://wordpress.org/support/users/maykato/)
 * (@maykato)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/custom-image-sizes-problem/#post-15086163)
 * Hi [@alexjkstudio](https://wordpress.org/support/users/alexjkstudio/)
 * We’ve not heard back from you in a while, so I’m marking this thread as resolved.
   Hopefully, you were able to find a solution to your problem! If you have further
   questions, please feel free to open a new topic.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom Image Sizes Problem’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [custom](https://wordpress.org/support/topic-tag/custom/)
 * [images](https://wordpress.org/support/topic-tag/images/)
 * [problem](https://wordpress.org/support/topic-tag/problem/)

 * 2 replies
 * 3 participants
 * Last reply from: [MayKato](https://wordpress.org/support/users/maykato/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/custom-image-sizes-problem/#post-15086163)
 * Status: resolved