{{ if .link }}{{ end }}
{{ $isJPG := eq (path.Ext .image) ".jpg" }} {{ $isPNG := eq (path.Ext .image) ".png" }} {{ if ($isJPG) -}} {{ $webpPath:= replace .image ".jpg" ".webp" }} {{ $webpPathStatic:= printf "static/%s" $webpPath }} {{ if (fileExists $webpPathStatic) -}} {{- end }} {{- end }} {{ if ($isPNG) -}} {{ $webpPath:= replace .image ".png" ".webp" }} {{ $webpPathStatic:= printf "static/%s" $webpPath }} {{ if (fileExists $webpPathStatic) -}} {{- end }} {{- end }} {{ $img := imageConfig (add "/static" (.image | safeURL)) }} {{ .alt }} {{ if .figcaption }}
{{ .figcaption }}
{{ end }}
{{ if .link }}
{{ end }}