{{- $image := .Page.Resources.GetMatch (printf "%s" (.Destination | safeURL)) -}} {{- $small := $image.Resize "480x" -}} {{- $big := $image.Resize "1024x" -}} {{- $alt := .PlainText | safeHTML -}} {{- $caption := "" -}} {{- with $alt -}} {{- $caption = . | safeHTML -}} {{- end -}}
{{ if $alt }}{{ $alt }}{{ else if $caption }}{{ $caption | markdownify | plainify }}{{ else }} {{ end }} {{ with $caption }}
{{ . | markdownify }}
{{ end }}