SVG files can be used as thumbnails I guess

This commit is contained in:
Mikael Nordfeldth 2015-03-05 11:59:11 +01:00
parent ff6969302b
commit 3755faf558

View File

@ -128,6 +128,14 @@ class ImageFile
if (empty($file->filename)) {
throw new UnsupportedMediaException(_('File without filename could not get a thumbnail source.'));
}
// First some mimetype specific exceptions
switch ($file->mimetype) {
case 'image/svg+xml':
throw new UseFileAsThumbnailException($file->id);
}
// And we'll only consider it an image if it has such a media type
switch ($media) {
case 'image':
$imgPath = $file->getPath();