{% for i in pimcore_iterate_block(pimcore_block('gallery')) %}
{% if editmode %}
{{ pimcore_image('image', { thumbnail: 'galleryThumbnail', imgAttributes: {class: 'img-thumbnail'}}) }}
{% else %}
{{ macros.image_link(pimcore_image('image', { thumbnail: 'galleryThumbnail', imgAttributes: {class: 'img-thumbnail'}}), editmode, 'galleryLightbox') }}
{% endif %}
{% endfor %}