• Resolved ozanyilmaz2017

    (@ozanyilmaz2017)


    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)
  • Thread Starter ozanyilmaz2017

    (@ozanyilmaz2017)

    I found a way to stop generating these thumbnails by adding

     unset( $sizes['variation_swatches_image_size']);
     unset( $sizes['variation_swatches_tooltip_size']);

    to my function above.

    Can you tell me will this cause this plugin to broke ? Or will it continue to function properly ?

    In any case, I believe that this plugin should not add new sizes.

    Plugin Support fizanzvai

    (@fizanzvai)

    @ozanyilmaz2017

    Yes, it should work with any problem.

    Thank you

    Plugin Support fizanzvai

    (@fizanzvai)

    @ozanyilmaz2017

    Yes, it should work without any problem.

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Generating Unsetted Image Sizes ?’ is closed to new replies.