responsive-image-formatter.html.twig
Same filename in this branch
Same filename in other branches
- 9 core/themes/stable9/templates/field/responsive-image-formatter.html.twig
- 9 core/themes/stable/templates/field/responsive-image-formatter.html.twig
- 9 core/modules/responsive_image/templates/responsive-image-formatter.html.twig
- 8.9.x core/themes/stable/templates/field/responsive-image-formatter.html.twig
- 8.9.x core/modules/responsive_image/templates/responsive-image-formatter.html.twig
- 11.x core/themes/stable9/templates/field/responsive-image-formatter.html.twig
- 11.x core/modules/responsive_image/templates/responsive-image-formatter.html.twig
Theme override to display a formatted responsive image field.
Available variables:
- responsive_image: A collection of responsive image data.
- url: An optional URL the image can be linked to.
See also
template_preprocess_responsive_image_formatter()
1 theme call to responsive-image-formatter.html.twig
- ResponsiveImageFormatter::viewElements in core/
modules/ responsive_image/ src/ Plugin/ Field/ FieldFormatter/ ResponsiveImageFormatter.php
File
-
core/
themes/ stable9/ templates/ field/ responsive-image-formatter.html.twig
View source
- {#
- /**
- * @file
- * Theme override to display a formatted responsive image field.
- *
- * Available variables:
- * - responsive_image: A collection of responsive image data.
- * - url: An optional URL the image can be linked to.
- *
- * @see template_preprocess_responsive_image_formatter()
- */
- #}
- {% if url %}
- <a href="{{ url }}">{{ responsive_image }}</a>
- {% else %}
- {{ responsive_image }}
- {% endif %}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.