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?

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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