photoswipe-image-formatter.html.twig in PhotoSwipe 8.2
Same filename and directory in other branches
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.
1 theme call to photoswipe-image-formatter.html.twig
- PhotoswipeFieldFormatter::viewElements in src/
Plugin/ Field/ FieldFormatter/ PhotoswipeFieldFormatter.php - Builds a renderable array for a field value.
File
templates/photoswipe-image-formatter.html.twigView source
- {#
- /**
- * @file
- * 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.
- *
- * @ingroup themeable
- */
- #}
- <a href="{{ path }}"{{ attributes }}>{{ image }}</a>