[Resolved] woocommerce generates thumbnails for everything

Home Forums Support [Resolved] woocommerce generates thumbnails for everything

Home Forums Support woocommerce generates thumbnails for everything

  • This topic has 3 replies, 2 voices, and was last updated 5 months ago by David.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2152754
    Halil

    Hi,
    I’ve noticed that after installing woocommerce, 2 additional thumbails were added for every image in media library! I delibaretely disabled many thumbnail sizes and I wasnt expecting such behaviour. Is there any way to prevent this behaviour? I’ve changed setting in customizer to 0 for main image/thumbnail width, also chose “uncropped”. I have no idea if these settings have anything to do with thumbnails.

    #2153056
    David
    Staff
    Customer Support

    Hi there,

    Woocommerce doesn’t document it – but I do believe that Setting those sizes to 0 should remove the image.
    If not then you can try adding this snippet to remove the sizes that woo generates:

    function sr_remove_woocommerce_image_sizes() {
        
        // Remove woocommerce copied sizes from default
        remove_image_size( 'woocommerce_thumbnail' );
        remove_image_size( 'woocommerce_single' );
        remove_image_size( 'woocommerce_gallery_thumbnail' );
        
    }
    add_action( 'init', 'sr_remove_woocommerce_image_sizes', 99 ); 

    Code found here: https://stackoverflow.com/a/63643876

    Note the comment, it won’t remove existing images but will stop new ones being generated.

    #2153105
    Halil

    thanks a lot David,
    if I knew that woo behaviour I wouldnt install it at all.

    #2153177
    David
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.