From 75610ea402bd2adb0eeddf03616637c243633114 Mon Sep 17 00:00:00 2001 From: Kristof Jochmans Date: Wed, 20 Aug 2014 12:03:22 +0200 Subject: [PATCH] do not try to make thumbnails for svg images --- Resources/views/Folder/show.html.twig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Resources/views/Folder/show.html.twig b/Resources/views/Folder/show.html.twig index 868373ab..e2e4dda9 100644 --- a/Resources/views/Folder/show.html.twig +++ b/Resources/views/Folder/show.html.twig @@ -109,7 +109,11 @@ {% set handler = mediamanager.getHandler(media) %} {% set imageurl = handler.getImageUrl(media, app.request.basePath) %} {% if imageurl is not empty and media.location == 'local' %} - {% set imageurl = imageurl | imagine_filter('media_list_thumbnail') %} + {% if imageurl|lower|split('.')|last == 'svg' or 'image/svg' in media.contentType %} + {% set imageurl = imageurl %} + {% else %} + {% set imageurl = imageurl | imagine_filter('media_list_thumbnail') %} + {% endif %} {% endif %} {% if imageurl %} {{ media.name }}