--- inc/page.inc	2008-07-19 09:27:27.000000000 -0400
+++ inc/page_fixed.inc	2009-01-23 12:29:10.000000000 -0500
@@ -625,7 +625,8 @@ function imce_validate_quotas($file, &$i
  * Check if the file is an image and return info.
  */
 function imce_image_info($file) {
-  if (is_file($file) && ($info = @getimagesize($file)) && in_array($info[2], array(IMAGETYPE_JPEG, IMAGETYPE_GIF, IMAGETYPE_PNG)) ) {
+  $path_parts = pathinfo($file);
+  if (is_file($file) && in_array($path_parts['extension'], array('jpg', 'jpeg', 'gif', 'png')) && ($info = @getimagesize($file)) && in_array($info[2], array(IMAGETYPE_JPEG, IMAGETYPE_GIF, IMAGETYPE_PNG)) ) {
     return array('width' => $info[0], 'height' => $info[1], 'type' => $info[2], 'mime' => $info['mime']);
   }
   return FALSE;
