“woocommerce_thumbnail” Not Regenerated after “shop_” Image Sizes Removed
-
Hello,
We are trying to optimise the images in a site by removing some of the image sizes with …
function mpc_wp_loaded() { remove_image_size('1536x1536'); remove_image_size('twentyseventeen-featured-image'); remove_image_size('twentyseventeen-thumbnail-avatar'); remove_image_size('shop_catalog'); remove_image_size('shop_single'); remove_image_size('shop_thumbnail'); } add_action('wp_loaded', 'mpc_wp_loaded’);
… however, when the “shop_” image sizes are removed and images are regenerated, the following happens (image is 960 x 768) …
thumbnail: 150×150 pixels (cropped to fit) IMG_6833-Version-2-150×150.jpg
medium: 300×300 pixels (proportionally resized to fit inside dimensions) IMG_6833-Version-2-300×240.jpg
X medium_large: 768×0 pixels (proportionally resized to fit inside dimensions) IMG_6833-Version-2-768×614.jpg
X large: 1024×1024 pixels (thumbnail would be larger than original)
X 2048×2048: 2048×2048 pixels (thumbnail would be larger than original)
X woocommerce_thumbnail: 250×200 pixels (cropped to fit) IMG_6833-Version-2-250×200.jpg
X woocommerce_single: 768×0 pixels (proportionally resized to fit inside dimensions) IMG_6833-Version-2-768×614.jpg
X woocommerce_gallery_thumbnail: 100×100 pixels (cropped to fit) IMG_6833-Version-2-100×100.jpg
ws-wc_thumbnail-5-4: 660×528 pixels (cropped to fit) IMG_6833-Version-2-660×528.jpg… then, when the thumbnails are regenerated again it creates the missing images …
thumbnail: 150×150 pixels (cropped to fit) IMG_6833-Version-2-150×150.jpg
medium: 300×300 pixels (proportionally resized to fit inside dimensions) IMG_6833-Version-2-300×240.jpg
medium_large: 768×0 pixels (proportionally resized to fit inside dimensions) IMG_6833-Version-2-768×614.jpg
X large: 1024×1024 pixels (thumbnail would be larger than original)
X 2048×2048: 2048×2048 pixels (thumbnail would be larger than original)
woocommerce_thumbnail: 250×200 pixels (cropped to fit) IMG_6833-Version-2-250×200.jpg
woocommerce_single: 768×0 pixels (proportionally resized to fit inside dimensions) IMG_6833-Version-2-768×614.jpg
woocommerce_gallery_thumbnail: 100×100 pixels (cropped to fit) IMG_6833-Version-2-100×100.jpg
ws-wc_thumbnail-5-4: 660×528 pixels (cropped to fit) IMG_6833-Version-2-660×528.jpgPreventing the removal of these image sizes prevents the issue …
function mpc_wp_loaded() { remove_image_size('1536x1536'); remove_image_size('twentyseventeen-featured-image'); remove_image_size('twentyseventeen-thumbnail-avatar'); // remove_image_size('shop_catalog'); // remove_image_size('shop_single'); // remove_image_size('shop_thumbnail'); } add_action('wp_loaded', 'mpc_wp_loaded’);
Please advise what’s going on here and how we can remove these image sizes without breaking the “woocommerce_” image sizes?
Thank you,
Oliver
- The topic ‘“woocommerce_thumbnail” Not Regenerated after “shop_” Image Sizes Removed’ is closed to new replies.