image-widget.html.twig 593 B

12345678910111213141516171819202122232425
  1. {#
  2. /**
  3. * @file
  4. * Theme override for an image field widget.
  5. *
  6. * Available variables:
  7. * - attributes: HTML attributes for the containing element.
  8. * - data: Render elements of the image widget.
  9. *
  10. * @see template_preprocess_image_widget()
  11. */
  12. #}
  13. {{ attach_library('seven/classy.image-widget') }}
  14. <div{{ attributes }}>
  15. {% if data.preview %}
  16. <div class="image-preview">
  17. {{ data.preview }}
  18. </div>
  19. {% endif %}
  20. <div class="image-widget-data">
  21. {# Render widget data without the image preview that was output already. #}
  22. {{ data|without('preview') }}
  23. </div>
  24. </div>