W3cubDocs

/Drupal 8

image-style.html.twig

Default theme implementation for an image using a specific image style.

Available variables:

  • attributes: HTML attributes for the image, including the following:
    • src: Full URL or relative path to the image file.
    • class: One or more classes to be applied to the image.
    • width: The width of the image (if known).
    • height: The height of the image (if known).
    • title: The title of the image.
    • alt: The alternative text for the image.

See also

template_preprocess_image_style()

File

core/modules/image/templates/image-style.html.twig

Related topics

Theme system overview
Functions and templates for the user interface that themes can override.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!image!templates!image-style.html.twig/8.1.x