You are here

image.html.twig in Drupal 8

Theme override of an image.

Available variables:

  • attributes: HTML attributes for the img tag.
  • style_name: (optional) The name of the image style applied.

File

core/themes/stable/templates/field/image.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override of an image.
  5. *
  6. * Available variables:
  7. * - attributes: HTML attributes for the img tag.
  8. * - style_name: (optional) The name of the image style applied.
  9. *
  10. * @see template_preprocess_image()
  11. */
  12. #}
  13. <img{{ attributes }} />