From 9a843548c0c95cac3c9d6e8674c26d11fca027ed Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Wed, 25 Feb 2015 01:34:00 +0100 Subject: [PATCH] Save thumbnails with proper extension This might cause double extensions, but that's ok since the filename is stored in the database. We might want to look at it later though. --- classes/File.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/File.php b/classes/File.php index 8fd040b7e9..242d109804 100644 --- a/classes/File.php +++ b/classes/File.php @@ -442,7 +442,7 @@ class File extends Managed_DataObject } // throws exception on failure to generate thumbnail - $outname = "thumb-{$width}x{$height}-" . $image->filename; + $outname = "thumb-{$width}x{$height}-{$image->filename}." . File::guessMimeExtension($image->mimetype); $outpath = self::path($outname); // The boundary box for our resizing -- 2.39.5