diff --git a/www/galleri/index.php b/www/galleri/index.php
index 592bda9..b8d39ca 100644
--- a/www/galleri/index.php
+++ b/www/galleri/index.php
@@ -38,7 +38,7 @@ function getDirContents($dir, &$results = array()) {
             }
 
             //Check if the file is an image
-            $ext = pathinfo($path, PATHINFO_EXTENSION);
+            $ext = strtolower(pathinfo($path, PATHINFO_EXTENSION));
             if (in_array($ext, $GLOBALS["allowedExtensions"])) {
                 $results[] = $cleanPath;
             }