You are here

linkimage_formatter.html.twig in Link Image Field 8

Default theme implementation to display a LinkImageField.

Available variables:

  • image: Rendered image.
  • url: href option of link.
  • attributes: An array of link attributes.

File

templates/linkimage_formatter.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display a LinkImageField.
  5. *
  6. * Available variables:
  7. * - image: Rendered image.
  8. * - url: href option of link.
  9. * - attributes: An array of link attributes.
  10. *
  11. * @see template_preprocess_linkimage_formatter()
  12. *
  13. * @ingroup themeable
  14. */
  15. #}
  16. {% if url %}
  17. <a href="{{ url }}"{{ attributes }}>{{ image }}</a>
  18. {% else %}
  19. {{ image }}
  20. {% endif %}