{{ $in_gallery := .gallery | default false }} {{ if .image.id }} {{ $sizes := .sizes }} {{ $lazy := default true .lazy }} {{ $image := partial "GetMedia" .image.id }} {{ $image_class := printf "image-%s" (partial "GetImageDirection" .image) }} {{ $with_lightbox := not site.Params.image_sizes.design_system.lightbox.disabled }} {{ if and $with_lightbox $in_gallery }} {{ $with_lightbox = not site.Params.image_sizes.design_system.lightbox.in_gallery.disabled }} {{ end }} {{ if $image }} {{ with .image }} {{ $aria_label := partial "GetFigureAriaLabel" (dict "text" .text "credit" .credit )}} {{ end }} {{ end }} {{ end }}