You are here

photoswipe-image-formatter.html.twig in PhotoSwipe 8.2

Returns HTML for an image using a specific Photoswipe image style.

Available variables:

  • image: image item.
  • path: The path of the image that should be displayed in Photoswipe.
  • attributes: Link attributes.
  • item: An ImageItem object.
  • display_settings: optional image styles.

File

templates/photoswipe-image-formatter.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Returns HTML for an image using a specific Photoswipe image style.
  5. *
  6. * Available variables:
  7. * - image: image item.
  8. * - path: The path of the image that should be displayed in Photoswipe.
  9. * - attributes: Link attributes.
  10. * - item: An ImageItem object.
  11. * - display_settings: optional image styles.
  12. *
  13. * @ingroup themeable
  14. */
  15. #}
  16. <a href="{{ path }}"{{ attributes }}>{{ image }}</a>