Removing default image size list in Media Box

Removing default image size list in Media Box

I trying to remove unused image size (Thumbnail, Medium, Large) in MediaBox

Read More

Any function can i use in functions.php ? or some trick ?

PS : I know i can use jQuery trick but any better function to use ?

Related posts

Leave a Reply

2 comments

  1. Exactly the same code as Mridul, but different filter:

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

    Tested with WP 3.4.2
    removed image sizes

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