delete all default wordpress thumbnail sizes

delete all default WordPress thumbnail sizes

 


add_filter( 'intermediate_image_sizes_advanced', 'prefix_remove_default_images' );
// This will remove the default image sizes and the medium_large size. 
function prefix_remove_default_images( $sizes ) {
 unset( $sizes['small']); // 150px
 unset( $sizes['medium']); // 300px
 unset( $sizes['large']); // 1024px
 unset( $sizes['medium_large']); // 768px
 unset( $sizes['1536x1536']); // 768px
 unset( $sizes['2048x2048']); // 768px
 unset( $sizes['768x768']); // 768px
 unset( $sizes['scaled']); // 768px
 return $sizes;
}