Remove default Image Sizes

To unset all default image sizes in WordPress using PHP you can use this function:

add_filter( 'intermediate_image_sizes', 'remove_default_img_sizes', 10, 1);

function remove_default_img_sizes( $sizes ) {
  $targets = ['thumbnail', 'medium', 'medium_large', 'large', '1536x1536', '2048x2048'];

  foreach($sizes as $size_index=>$size) {
    if(in_array($size, $targets)) {

  return $sizes;

Alternatively, you can also unset default images by going into the WordPress dashboard. Then proceeding to Settings -> Media and put all value’s on 0. See image for reference:

enter image description here