   </span>
{{- end }}
{{- if and (not (eq $type "full")) (not (eq $type "margin")) }}
    {{ with .Get "link" }}<a href="{{ . }}" class="has-img">{{ end }}
        <img src="{{ $src }}"
            {{- with $alt }}
                alt="{{ . }}"
                title="{{ . }}"
            {{- end -}}
            aria-describedby="{{ $figID }}"
            loading="lazy"
            >
    {{- if .Get "link" }}</a>{{ end }}
{{- end }}
{{- if not (eq $type "margin") }}
    </figure>
{{- end }}