image.html.twig
Same filename in this branch
Same filename in other branches
- 9 core/profiles/demo_umami/themes/umami/templates/classy/field/image.html.twig
- 9 core/themes/stable9/templates/field/image.html.twig
- 9 core/themes/seven/templates/classy/field/image.html.twig
- 9 core/themes/claro/templates/classy/field/image.html.twig
- 9 core/themes/bartik/templates/classy/field/image.html.twig
- 9 core/themes/stable/templates/field/image.html.twig
- 9 core/themes/starterkit_theme/templates/field/image.html.twig
- 9 core/themes/classy/templates/field/image.html.twig
- 9 core/modules/system/templates/image.html.twig
- 8.9.x core/profiles/demo_umami/themes/umami/templates/classy/field/image.html.twig
- 8.9.x core/themes/seven/templates/classy/field/image.html.twig
- 8.9.x core/themes/claro/templates/classy/field/image.html.twig
- 8.9.x core/themes/bartik/templates/classy/field/image.html.twig
- 8.9.x core/themes/stable/templates/field/image.html.twig
- 8.9.x core/themes/classy/templates/field/image.html.twig
- 8.9.x core/modules/system/templates/image.html.twig
- 11.x core/profiles/demo_umami/themes/umami/templates/classy/field/image.html.twig
- 11.x core/themes/stable9/templates/field/image.html.twig
- 11.x core/themes/claro/templates/classy/field/image.html.twig
- 11.x core/themes/starterkit_theme/templates/field/image.html.twig
- 11.x core/modules/system/templates/image.html.twig
Default theme implementation of an image.
Available variables:
- attributes: HTML attributes for the img tag.
- style_name: (optional) The name of the image style applied.
See also
27 theme calls to image.html.twig
- contextual_help in core/
modules/ contextual/ contextual.module - Implements hook_help().
- FilemimeFormatter::viewValue in core/
modules/ file/ src/ Plugin/ Field/ FieldFormatter/ FilemimeFormatter.php - Generate the output appropriate for one field item.
- ImageFieldDisplayTest::testImageFieldDefaultImage in core/
modules/ image/ tests/ src/ Functional/ ImageFieldDisplayTest.php - Tests use of a default image with an image field.
- ImageFieldDisplayTest::testImageFieldSettings in core/
modules/ image/ tests/ src/ Functional/ ImageFieldDisplayTest.php - Tests for image field settings.
- ImageFieldDisplayTest::testImageLoadingAttribute in core/
modules/ image/ tests/ src/ Functional/ ImageFieldDisplayTest.php - Tests for image loading attribute settings.
File
-
core/
modules/ system/ templates/ image.html.twig
View source
- {#
- /**
- * @file
- * Default theme implementation of an image.
- *
- * Available variables:
- * - attributes: HTML attributes for the img tag.
- * - style_name: (optional) The name of the image style applied.
- *
- * @see template_preprocess_image()
- *
- * @ingroup themeable
- */
- #}
- <img{{ attributes }} />
Related topics
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.