Index: /branches/release-36/lib/MT/Image.pm
===================================================================
--- /branches/release-36/lib/MT/Image.pm (revision 1174)
+++ /branches/release-36/lib/MT/Image.pm (revision 2085)
@@ -247,6 +247,9 @@
         $image->{data} = $blob;
     }
-    my %Types = (jpg => 'jpeg', gif => 'gif', 'png' => 'png');
+    my %Types = (jpg => 'jpeg', jpeg => 'jpeg', gif => 'gif', 'png' => 'png');
     my $type = $image->{type} = $Types{ lc $param{Type} };
+    if (!$type) {
+        return $image->error(MT->translate("Unsupported image file type: [_1]", $type));
+    }
     my($out, $err);
     my $pbm = $image->_find_pbm or return;
