SVG files can be used as thumbnails I guess
This commit is contained in:
parent
ff6969302b
commit
3755faf558
@ -128,6 +128,14 @@ class ImageFile
|
|||||||
if (empty($file->filename)) {
|
if (empty($file->filename)) {
|
||||||
throw new UnsupportedMediaException(_('File without filename could not get a thumbnail source.'));
|
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) {
|
switch ($media) {
|
||||||
case 'image':
|
case 'image':
|
||||||
$imgPath = $file->getPath();
|
$imgPath = $file->getPath();
|
||||||
|
Loading…
Reference in New Issue
Block a user