{% extends "wagtailadmin/widgets/chooser.html" %}

{% block chooser_class %}image-chooser{% endblock %}

{% block chosen_state_view %}
    <div class="preview-image">
        {% if video and video.thumbnail %}
            <img src='{{video.thumbnail.url}}' width="165" height="165" class="show-transparency">
        {% else %}
            <img width="165" height="165" class="show-transparency">
        {% endif %}
    </div>
{% endblock %}

{% block edit_chosen_item_url %}{% if video %}{% url 'wagtailvideos:edit' video.id %}{% endif %}{% endblock %}
