Applicable to : All Themes

Remove Default WordPress Image Sizes – Not Recommended

Not recommended. We have given this just for information purpose.

  • Not recommended, as this way theme will loose the native image responsive support provided by WordPress.
  • We recommended to go through more references prior to disable this provision.
  • A function given below in functions.php of child theme could work.
  • Remove image size as per the requirement.

function dtr_remove_default_image_sizes( $sizes) {
unset( $sizes['thumbnail']); // removes thumbnail
unset( $sizes['medium']); // removes medium
unset( $sizes['medium_large']); // removes medium_large
unset( $sizes['large']); // removes large
return $sizes;
}
add_filter('intermediate_image_sizes_advanced', 'dtr_remove_default_image_sizes');