Disable Auto-generated Image Sizes

// Disable Auto Generated Images Sizes
add_action('intermediate_image_sizes_advanced', 'disable_image_sizes');
function disable_image_sizes($sizes) {
	
	//unset($sizes['thumbnail']);    
	//unset($sizes['medium']);      
	//unset($sizes['large']);        
	unset($sizes['medium_large']);
	unset($sizes['1536x1536']);    
	unset($sizes['2048x2048']);
	
	return $sizes;
	
}
add_action('init', 'disable_other_image_sizes');
function disable_other_image_sizes() {

	remove_image_size('post-thumbnail'); 
	remove_image_size('another-size');
}

add_filter('big_image_size_threshold', '__return_false');