Hide Thumbnail Sizes from Media Uploader in WordPress

Hide Thumbnail Sizes from Media Uploader in WordPress

This code hides certain thumbnail sizes from the media uploader, paste this code in your theme’s functions.php file

<?php
	function remove_image_size($possible_sizes) {
		unset( $possible_sizes['small'] );
		unset( $possible_sizes['medium'] );
		unset( $possible_sizes['large'] );
		return $possible_sizes;
	}
	add_filter('image_size_names_choose', 'remove_image_size');
?>