{{ $image := resources.GetMatch (.Get "src") }} {{ $size := .Get "size" }} {{/* Set the right options for Resize */}} {{ $options := printf "%s %s %s" $size "webp q90 drawing" "Lanczos"}} {{ $imagethumbnail := $image.Resize $options }} {{ with .Get {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
{{ with (.Get "title") -}}

{{ . }}

{{- end -}} {{- if or (.Get "caption") (.Get "attr") -}}

{{- .Get "caption" | markdownify -}} {{- with .Get "attrlink" }} {{- end -}} {{- .Get "attr" | markdownify -}} {{- if .Get "attrlink" }}{{ end }}

{{- end }}
{{- end }}