{% for event in data %}
{% set dates = event.attributes.dates.self %}
{% set display_date = date_range(dates.startDate, dates.endDate, {'output': 'object', 'showyear': true} ) %}
{% if event.relationships.media %}
{% for media in event.relationships.media.data %}
{% if "image" == media.type %}
{%- if dates.endDate is not empty -%}
{{- display_date.separator -}}
{%- endif -%}
{% if event.relationships.media is defined %}
{% set media_array = find_media(event.relationships.media.data, included) %}
{% for media in media_array %}
{% if loop.first %}