Skip to content

Commit

Permalink
do not try to make thumbnails for svg images
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristof Jochmans committed Aug 20, 2014
1 parent f6b4c19 commit 75610ea
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 75610ea

Please sign in to comment.