• Resolved Rookie

    (@alriksson)


    Is there a way to block and remove the default images sizes so they are never generated or in the regeneration?
    Thumbnail
    Medium
    Medium_large
    Large

    This doesnt seem to remove them from shortpixel or in page builder selections:

    <?php
    
    // Remove default image sizes
    
    function wpb_remove_default_images( $sizes ) {
    
    unset( $sizes['small']); // 150px
    
    unset( $sizes['medium']); // 300px
    
    unset( $sizes['large']); // 1024px
    
    unset( $sizes['medium_large']); // 768px
    
    unset( $sizes[ '1536x1536' ]);
    
    unset( $sizes[ '2048x2048' ]);
    
    return $sizes;
    
    }
    
    add_filter( 'intermediate_image_sizes_advanced', 'wpb_remove_default_images' );
    
    remove_image_size( '1536x1536' );
    
    remove_image_size( '2048x2048' );
Viewing 1 replies (of 1 total)
  • Plugin Support Gerard Blanco

    (@sixaxis)

    Hi Rookie,

    This plugin does not block the default image sizes (or any image sizes). reGenerate Thumbnails Advanced is used to regenerate thumbnails. You can prevent it from regenerating certain thumbnail sizes (see the quick start guide), but it will not prevent any image sizes from being created when you upload a file.

    Cheers,

Viewing 1 replies (of 1 total)
  • The topic ‘remove sizes’ is closed to new replies.