{% extends "EzPublishCoreBundle::content_fields.html.twig" %}

{% block ezimage_field %}
{% spaceless %}
{% if field.value %}
    {% set imageAlias = get_image_variation( field, versionInfo, parameters.alias|default( 'original' ) ) %}
    <img src="{% if imageAlias %}{{ asset( imageAlias.uri ) }}{% else %}//:0{% endif %}"{% if imageAlias.width is defined and imageAlias.width is not empty %} width="{{ imageAlias.width }}"{% endif %}{% if imageAlias.height is defined and imageAlias.height is not empty %} height="{{ imageAlias.height }}"{% endif %} alt="{{ parameters.alt|default( field.value.alternativeText ) }}" {{ block( 'field_attributes' ) }}/>
{% endif %}
{% endspaceless %}
{% endblock %}