image-formatter-link-to-image-style-formatter.html.twig in Image formatter link to image style 8
Image formatter link to image style theme implementation to display a formatted image field.
Available variables:
- image: A collection of image data.
- image_style: An optional image style.
- url: An URL the image can be linked to.
- url_rel: An optional URL rel attribute.
- url_class: An optional URL class attribute.
1 theme call to image-formatter-link-to-image-style-formatter.html.twig
- ImageFormatterLinkToImageStyleFormatter::viewElements in src/
Plugin/ Field/ FieldFormatter/ ImageFormatterLinkToImageStyleFormatter.php - Builds a renderable array for a field value.
File
templates/image-formatter-link-to-image-style-formatter.html.twigView source
- {#
- /**
- * @file
- * Image formatter link to image style theme implementation to display a
- * formatted image field.
- *
- * Available variables:
- * - image: A collection of image data.
- * - image_style: An optional image style.
- * - url: An URL the image can be linked to.
- * - url_rel: An optional URL rel attribute.
- * - url_class: An optional URL class attribute.
- *
- * @see template_preprocess_image_formatter_link_to_image_style_formatter()
- *
- * @ingroup themeable
- */
- #}
- <a {% if url_rel %}rel="{{ url_rel }}" {% endif %}{% if url_class %}class="{{ url_class }}" {% endif %}href="{{ url }}">{{ image }}</a>