Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Removing default image size list in Media Box

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

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 ?

share|improve this question
3  
+1 for the great use of an animated gif :) –  brasofilo Oct 22 '12 at 9:24

2 Answers 2

up vote 5 down vote accepted

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

share|improve this answer
    
Work ! :D thanks so much –  l2aelba Oct 22 '12 at 9:37
    
@brasofilo This only applies to default images. Do you know a solution to unset custom image sizes? I've opened a question: wordpress.stackexchange.com/questions/95344/… –  Christine Cooper Apr 10 '13 at 19:51
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');
share|improve this answer
    
nope , cant do with this :( –  l2aelba Oct 22 '12 at 8:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.