From: Mikael Nordfeldth Date: Wed, 25 Feb 2015 00:34:00 +0000 (+0100) Subject: Save thumbnails with proper extension X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=9a843548c0c95cac3c9d6e8674c26d11fca027ed;p=quix0rs-gnu-social.git 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. --- 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