I'm trying to use the script below in order to disable automatic thumbnail generation when images are uploaded via the media manager.
I'd like to leave the thumbnail option intact when an image is uploaded directly to a post, because that uploader gives the user the ability to specify the image size.
The problem is that it disables thumbnail options in both places. I want to allow thumbs everywhere except the media manager upload.
if ($pagenow == 'media-new.php' || $pagenow == 'async-upload.php'){
add_filter('intermediate_image_sizes_advanced','disable_thumbnails');
}
function disable_thumbnails($arr_sizes){
if(!stristr($_POST['type'], 'image')){
return array();
}
return $arr_sizes;
}