image_link_attributes-8.x-1.4/templates/field/image-formatter.html.twig

templates/field/image-formatter.html.twig
{#
/**
 * @file
 * Theme override to display a formatted image field.
 *
 * Available variables:
 * - image: A collection of image data.
 * - image_style: An optional image style.
 * - url: An optional URL the image can be linked to.
 * - link_attributes: The attributes to add to the link around the image.
 *
 * @see template_preprocess_image_formatter()
 */
#}

{% if url %}
  {% if alternate_path|trim is not empty %} 
    {{ link(image, alternate_path, link_attributes) }}
  {% else %}
    {{ link(image, url, link_attributes) }}
  {% endif %}
{% else %}
  {{ image }}
{% endif %}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc