image-formatter.html.twig 507 B

1234567891011121314151617181920
  1. {#
  2. /**
  3. * @file
  4. * Theme override to display a formatted image field.
  5. *
  6. * Available variables:
  7. * - image: A collection of image data.
  8. * - image_style: An optional image style.
  9. * - url: An optional URL the image can be linked to.
  10. *
  11. * @see template_preprocess_image_formatter()
  12. */
  13. #}
  14. {% if url %}
  15. {# {{ link(image, url, { '@click.prevent.stop':'onClickLink' }) }} #}
  16. <!-- attributes are added from vue_link_formatter custom module -->
  17. {{ link(image, url) }}
  18. {% else %}
  19. {{ image }}
  20. {% endif %}