   {{- $src = .RelPermalink -}}
      {{- $width = .Width -}}
      {{- $height = .Height -}}
    {{- end -}}
  {{- end -}}

  <img src="{{ $src }}"
    {{- with .Get "alt" -}}
      alt="{{ . }}"
    {{- else with .Get "caption" -}}
      alt="{{ . | markdownify | plainify }}"
    {{- end -}}
    {{- with or (.Get "width") $width }}width="{{ . }}"{{ end -}}
    {{- with or (.Get "height") $height }}height="{{ . }}"{{ end -}}
    {{- with .Get "loading" }}loading="{{ . }}"{{ end -}}
  />
  {{- if .Get "link