diff options
Diffstat (limited to 'lib/class/album.class.php')
-rw-r--r-- | lib/class/album.class.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/class/album.class.php b/lib/class/album.class.php index a4c9601b..c74bd800 100644 --- a/lib/class/album.class.php +++ b/lib/class/album.class.php @@ -453,6 +453,8 @@ class Album { /* If it's an image file */ if ($extension == "jpg" || $extension == "gif" || $extension == "png" || $extension == "jp2") { + if ($extension == 'jpg') { $extension = 'jpeg'; } + // HACK ALERT this is to prevent duplicate filenames $full_filename = $dir . '/' . $file; $index = md5($full_filename); @@ -633,7 +635,7 @@ class Album { // Rudimentary image type detection, only JPG and GIF allowed. if (substr($result[$key], -4 == '.jpg')) { - $mime = "image/jpg"; + $mime = "image/jpeg"; } elseif (substr($result[$key], -4 == '.gif')) { $mime = "image/gif"; @@ -763,7 +765,7 @@ class Album { } // if we have PHP:GD // Default to image/jpg as a guess if there is no passed mime type - $mime = $mime ? $mime : 'image/jpg'; + $mime = $mime ? $mime : 'image/jpeg'; // Push the image into the database $sql = "REPLACE INTO `album_data` SET `art` = '" . Dba::escape($image) . "'," . |