{{- $image := .Page.Resources.GetMatch (printf "%s" (.Destination | safeURL)) -}} {{- if and $image (ne (path.Ext .Destination) ".svg") -}} {{- $alt := .PlainText | safeHTML -}} {{- $Permalink := $image.RelPermalink -}} {{- $Width := $image.Width -}} {{- $Height := $image.Height -}} {{- $Srcset := "" -}} {{- if (default true .Page.Site.Params.imageProcessing.content.enabled) -}} {{- $small := $image.Resize "480x" -}} {{- $big := $image.Resize "1024x" -}} {{- $Srcset = printf "%s 480w, %s 1024w" $small.RelPermalink $big.RelPermalink -}} {{- end -}} {{ with $alt }} {{ . | markdownify }} {{ end }} {{- else -}} {{- end -}}