Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Tried setting the thumbnail size, but left medium + large to 0 0 to disable them, still all 3 were generated. Is there anyway to selectively disable these via functions.php?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You can disable the medium and large image sizes by using the 'intermediate_image_sizes' filter:

function remove_image_sizes($image_sizes){
    foreach($image_sizes as $key => $size){
        if($size == 'large' || $size == 'medium')
    return $image_sizes;
add_filter('intermediate_image_sizes', 'remove_image_sizes', 12, 1);

This skips adding these sizes and the options to insert a medium/large image are left blank in the media item.

share|improve this answer

Your Answer


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.