{{ range .images }} {{ if .id }} {{- $image := partial "GetMedia" .id -}} {{- $image_class := printf "image-%s" (partial "GetImageDirection" .) -}} {{- if $image -}}
{{ partial "commons/image.html" (dict "image" .file "alt" .alt "sizes" site.Params.image_sizes.blocks.gallery.large )}} {{ if not site.Params.image_sizes.design_system.lightbox.disabled }} {{ $lightbox_text := false }} {{ if and .text .credit }} {{ $lightbox_text = delimit (slice .text .credit) " | " }} {{ else if or .text .credit }} {{ $lightbox_text = or .text .credit }} {{ end }} {{ end }} {{ if or .text .credit }}
{{ with .text }}

{{ . | safeHTML }}

{{ end }} {{ with .credit }}
{{ . | safeHTML }}
{{ end }}
{{ end }}
{{- end -}} {{ end }} {{ end }}