Generating Unsetted Image Sizes ?
-
Hi,
My woocommerce has a lot of products, so I unset some of the image sizes previously because it causes a lot of unnecessary images and slow website and my ftp program can’t open my images folder,
So I only use 2 image sizes. Default and 300×300.
But an update to this plugin broke this rule in my website, and generated lots of unnecessary images like 50×50 and 100×100, and I am now trying to recover from this issue.
Normally I unset the image sizes with below code in functions.php
add_filter( 'intermediate_image_sizes_advanced', 'prefix_remove_default_images' ); function prefix_remove_default_images( $sizes ) { unset( $sizes['shop_thumbnail']); //100px unset( $sizes['woocommerce_gallery_thumbnail']); //100px unset( $sizes['shop_single']); //600px unset( $sizes['woocommerce_single']); //600px unset( $sizes['medium_large']); // 768px return $sizes; }
I am not sure how it broke this rule, and how I will fix it.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Generating Unsetted Image Sizes ?’ is closed to new replies.