{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
{# @var field \EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto #}
{# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
{% set lightbox_content_id = 'ea-lightbox-' ~ field.uniqueId %}
<a href="#" class="ea-lightbox-thumbnail" data-lightbox-content-selector="#{{ lightbox_content_id }}">
    <img src="{{ asset(field.formattedValue) }}" class="img-fluid">
</a>

<div id="{{ lightbox_content_id }}" class="ea-lightbox">
    <img src="{{ asset(field.formattedValue) }}">
</div>

{# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
{# @var field \EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto #}
{# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
{% set images = field.formattedValue %}
{% if images is not iterable %}
    {% set images = [images] %}
{% endif %}

{% for image in images %}
    {% set html_id = 'ea-lightbox-' ~ field.uniqueId ~ '-' ~ loop.index %}
    <a href="#" class="ea-lightbox-thumbnail" data-featherlight="#{{ html_id }}" data-featherlight-close-on-click="anywhere">
        <img src="{{ asset(image) }}" class="img-fluid">
    </a>

    <div id="{{ html_id }}" class="ea-lightbox">
        <img src="{{ asset(image) }}">
    </div>
{% endfor %}

Fix ImageField template for multiple images
Fix ImageField template for multiple images
