Paulund
2012-07-13 #wordpress

Remove Default WordPress Image Sizes

When you upload an image to Wordpress by default it will be converted to three different sizes.

  • Thumbnail
  • Medium Size
  • Large Size

If you don't want your users to use any of these images sizes on your theme then you might want to stop the user from using these different sizes. You can remove these from being used by using the Wordpress action intermediate_image_sizes_advanced and unset the thumbnail, medium and large sizes, this will mean the only size they have left is the full image size.

function paulund_remove_default_image_sizes( $sizes) {
    unset( $sizes['thumbnail']);
    unset( $sizes['medium']);
    unset( $sizes['large']);
     
    return $sizes;
}
add_filter('intermediate_image_sizes_advanced', 'paulund_remove_default_image_sizes');