h }}" height="{{ .Height }}" loading="lazy">
      {{ end }}
    {{ else }}
      <img src="{{ .Destination | safeURL }}" alt="{{ $text }}" width="{{ .Width }}" height="{{ .Height }}" loading="lazy">
    {{ end }}
    <figcaption>{{ .Title | markdownify }}</figcaption>
  </figure>
{{ else }}
  {{ with ($image.Get "resource") }}
    {{ if eq .MediaType.SubType "svg" }}
      {{ .Content | safeHTML }}
    {{ else }}
      <img src="{{ .RelPermalink | safeURL }}" alt="{{ $text }}" width="{{ .Width }}" height="