Index: wp-includes/media.php
===================================================================
--- wp-includes/media.php	(revision 9744)
+++ wp-includes/media.php	(working copy)
@@ -125,6 +125,10 @@
  */
 function image_downsize($id, $size = 'medium') {
 
+	// plugins can use this to provide resize services
+	if ( $out = apply_filters('image_downsize', false, $id, $size) )
+		return $out;
+
 	if ( !wp_attachment_is_image($id) )
 		return false;
 
@@ -133,10 +137,6 @@
 	$width = $height = 0;
 	$is_intermediate = false;
 
-	// plugins can use this to provide resize services
-	if ( $out = apply_filters('image_downsize', false, $id, $size) )
-		return $out;
-
 	// try for a new style intermediate size
 	if ( $intermediate = image_get_intermediate_size($id, $size) ) {
 		$img_url = str_replace(basename($img_url), $intermediate['file'], $img_url);
