image-widget.html.twig 581 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
{#
/**
 * @file
 * Default theme implementation for an image field widget.
 *
 * Available variables:
 * - attributes: HTML attributes for the containing element.
 * - data: Render elements of the image widget.
 *
 * @see template_preprocess_image_widget()
 *
 * @ingroup themeable
 */
#}
<div{{ attributes }}>
  {% if data.preview %}
    <div class="image-preview">
      {{ data.preview }}
    </div>
  {% endif %}
  <div class="image-widget-data">
    {# Render widget data without the image preview that was output already. #}
    {{ data|without('preview') }}
  </div>
</div>