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.
This commit is contained in:
Mikael Nordfeldth 2015-02-25 01:34:00 +01:00
parent 220a13b87f
commit 9a843548c0

View File

@ -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