Index: wp-includes/media.php
===================================================================
--- wp-includes/media.php	(revision 11635)
+++ wp-includes/media.php	(working copy)
@@ -486,6 +486,16 @@
 }
 
 /**
+ * Get the available image sizes
+ * @since 2.8.1
+ * @return array Returns a filtered array of image size strings
+ */
+function get_intermediate_sizes()
+{
+	return apply_filters('intermediate_image_sizes', array('thumbnail', 'medium', 'large'));
+}
+
+/**
  * Retrieve an image to represent an attachment.
  *
  * A mime icon for files, thumbnail or intermediate size for images.
Index: wp-includes/post.php
===================================================================
--- wp-includes/post.php	(revision 11635)
+++ wp-includes/post.php	(working copy)
@@ -2613,7 +2613,7 @@
 	}
 
 	// remove intermediate images if there are any
-	$sizes = apply_filters('intermediate_image_sizes', array('thumbnail', 'medium', 'large'));
+	$sizes = get_intermediate_sizes();
 	foreach ( $sizes as $size ) {
 		if ( $intermediate = image_get_intermediate_size($postid, $size) ) {
 			$intermediate_file = apply_filters('wp_delete_file', $intermediate['path']);
Index: wp-admin/includes/image.php
===================================================================
--- wp-admin/includes/image.php	(revision 11635)
+++ wp-admin/includes/image.php	(working copy)
@@ -105,8 +105,7 @@
 		$metadata['file'] = $file;
 
 		// make thumbnails and other intermediate sizes
-		$sizes = array('thumbnail', 'medium', 'large');
-		$sizes = apply_filters('intermediate_image_sizes', $sizes);
+		$sizes = get_intermediate_sizes();
 
 		foreach ($sizes as $size) {
 			$resized = image_make_intermediate_size( $full_path_file, get_option("{$size}_size_w"), get_option("{$size}_size_h"), get_option("{$size}_crop") );
