<div>
    <label for="id_{{ field.name }}">{{ field.label }}</label>
    <input
        type="file"
        name="{{ field.name }}"
        id="id_{{ field.name }}"
        {% if field.is_required.choice %}required{% endif %}
        {% if allowed_extensions %}accept=".{{ allowed_extensions.extensions | join(sep=",.") }}"{% endif %}
        {% for key, value in field.html_attributes %}{{ key }}="{{ value }}" {% endfor %}
        {% if readonly.choice %}readonly{% endif %}
        {% if disabled.choice %}disabled{% endif %}
    >

    {% if allowed_extensions or max_size or max_files or max_width or max_height %}
    <div class="field-hints">
        {% if allowed_extensions %}
            Extensions : {{ allowed_extensions.extensions | join(sep=", ") }}
        {% endif %}
        {% if max_size %}
            · Max {{ max_size_mb | round(precision=1) }} MB
        {% endif %}
        {% if max_files %}
            · Max {{ max_files }} fichier(s)
        {% endif %}
        {% if max_width and max_height %}
            · Dimensions max : {{ max_width }}x{{ max_height }}px
        {% endif %}
    </div>
    {% endif %}

    {% if field.error %}
    <span>{{ field.error }}</span>
    {% endif %}
</div>