Skip to content

Commit

Permalink
Merge pull request #161 from Kunstmaan/fix_svg_thumbnails
Browse files Browse the repository at this point in the history
do not try to make thumbnails for svg images
  • Loading branch information
Wim Vandersmissen committed Aug 20, 2014
2 parents dcef8c4 + 75610ea commit 63af445
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Resources/views/Folder/show.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
<img src="{{ imageurl }}" alt="{{ media.name }}" />
Expand Down

0 comments on commit 63af445

Please sign in to comment.