WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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.