2022-05-20 11:19:35 +01:00
|
|
|
{{- $img := .Page.Resources.GetMatch .Destination -}}
|
|
|
|
{{- if and (not $img) .Page.File -}}
|
|
|
|
{{ $path := path.Join .Page.File.Dir .Destination }}
|
|
|
|
{{- $img = resources.Get $path -}}
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
{{- with $img -}}
|
|
|
|
<img loading="lazy" src="{{ $img.RelPermalink }}" alt="{{ $.Text }}" {{ with $.Title}} title="{{ . }}" {{ end }} />
|
|
|
|
{{- end -}}
|