diff --git a/imagefield_zip.module b/imagefield_zip.module
index 950dd5d..14e0b1f 100644
--- a/imagefield_zip.module
+++ b/imagefield_zip.module
@@ -897,8 +897,8 @@ function imagefield_zip_is_image(&$file, $formats) {
   foreach ($formats_array as $ext) {
     $ext = '.' . $ext;
     $ext_len = strlen($ext) * -1;
-    if (substr($file->filepath, $ext_len) === $ext) {
-      // file ends in one of the valid formats.
+    if (strcasecmp(substr($file->filepath, $ext_len), $ext) === 0) {
+      // File ends in one of the valid formats.
       $valid_file = TRUE;
       break;
     }
