{% extends '@KunstmaanMedia/Media/File/show.html.twig' %}
{% block extraactions %}
{% if handler.aviaryApiKey and not (handler.aviaryApiKey starts with 'Register') %}
{% include '@KunstmaanMedia/Media/Image/aviary.html.twig' %}
{% endif %}
{{ 'media.media.download.action'|trans }}
{% endblock %}
{% block preview %}
{% set imageurl = handler.getImageUrl(media, app.request.basePath) %}
{% if imageurl is not empty and media.location == 'local' %}
{% if imageurl|lower|split('.')|last == 'svg' or 'image/svg' in media.contentType %}
{% set imageurl = imageurl %}
{% else %}
{% set imageurl = asset(imageurl | imagine_filter('media_detail_thumbnail')) %}
{% endif %}
{% endif %}
{% endblock %}