7 lines
335 B
HTML
7 lines
335 B
HTML
{{- $img := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) -}}
|
|
{{- if gt $img.Width 200 }}{{ $img = $img.Resize "200x q90" }}{{ end -}}
|
|
{{- if gt $img.Height 270 }}{{ $img = $img.Resize "x270 q90" }}{{ end -}}
|
|
{{- with $img -}}
|
|
<img src="{{ .Permalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="Doctor">
|
|
{{- end -}}
|