git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

Commit 3755faf5 authored by mmn's avatar mmn

SVG files can be used as thumbnails I guess

parent ff696930
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment