{{- if .Get "link" -}}
{{- end }}
{{ if eq (path.Ext (.Get "src")) ".svg" }}
{{ readFile (path.Join $.Page.File.Dir (.Get "src")) | safeHTML }}
{{ else }}
{{ end }}
{{- if .Get "link" }}{{ end -}}
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
{{- default (.Get "title") (.Get "caption") | markdownify -}}
{{- with .Get "attrlink" }}{{- end -}}
{{- .Get "attr" | markdownify -}}
{{- if .Get "attrlink" }}{{ end }}
{{- end }}