responsive-image-formatter.html.twig 440 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{#
/**
 * @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 %}