{{ $img := resources.Get (.Get "src") }} {{ $hint := "photo" }} {{ $q := 69 }} {{ if (.Get "quality" )}} {{ $q = .Get "quality" }} {{ end }} {{ if (.Get "hint" )}} {{ $hint = .Get "hint" }} {{ end }} {{ if ne $img.MediaType.SubType "svg" }} {{ $w := "" }} {{ $h := "" }} {{ if (.Get "width") }} {{ $w = .Get "width" }} {{ else }} {{ $w = $img.Width | string }} {{ end }} {{ if (.Get "height") }} {{ $h = .Get "height" }} {{ end }} {{ $img = $img.Resize (printf "%sx%s webp %s q%d" $w $h $hint $q) }} {{ end }}
{{ with $img | fingerprint }} {{ end }} {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr") }}
{{ if isset .Params "title" }}

{{ .Get "title" }}

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

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

{{ end }}
{{ end }}