Same filename in this branch
  1. 10 core/modules/image/templates/image-widget.html.twig
  2. 10 core/themes/claro/templates/content-edit/image-widget.html.twig
  3. 10 core/themes/stable9/templates/content-edit/image-widget.html.twig
  4. 10 core/themes/starterkit_theme/templates/content-edit/image-widget.html.twig
  5. 10 core/profiles/demo_umami/themes/umami/templates/classy/content-edit/image-widget.html.twig
Same filename and directory in other branches
  1. 8.9.x core/modules/image/templates/image-widget.html.twig
  2. 9 core/modules/image/templates/image-widget.html.twig

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 also

template_preprocess_image_widget()

File

core/modules/image/templates/image-widget.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation 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. * @ingroup themeable
  13. */
  14. #}
  15. <div{{ attributes }}>
  16. {{ data.preview }}
  17. {# Render widget data without the image preview that was output already. #}
  18. {{ data|without('preview') }}
  19. </div>

Related topics