responsive-image-formatter.html.twig in Zircon Profile 8
Same filename in this branch
Same filename and directory in other branches
Default theme implementation 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.
1 theme call to responsive-image-formatter.html.twig
- ResponsiveImageFormatter::viewElements in core/
modules/ responsive_image/ src/ Plugin/ Field/ FieldFormatter/ ResponsiveImageFormatter.php - Builds a renderable array for a field value.
File
core/modules/responsive_image/templates/responsive-image-formatter.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation 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()
- *
- * @ingroup themeable
- */
- #}
- {% if url %}
- <a href="{{ url }}">{{ responsive_image }}</a>
- {% else %}
- {{ responsive_image }}
- {% endif %}