Perf: add fixed image ratio

This commit is contained in:
Nicolas Lorin
2023-03-11 11:03:26 +01:00
parent f762efde93
commit 6af086dd65

View File

@@ -6,11 +6,11 @@
{{- with $featured -}}
{{ if $disableImageOptimization }}
{{ with . }}
<img class="w-full rounded-lg single_hero_round nozoom" src="{{ .RelPermalink }}">
<img class="w-full rounded-lg single_hero_round nozoom" width="{{ .Width }}" height="{{ .Height }}" src="{{ .RelPermalink }}">
{{ end }}
{{ else }}
{{ with .Resize "1200x" }}
<img class="w-full rounded-lg single_hero_round nozoom" src="{{ .RelPermalink }}">
<img class="w-full rounded-lg single_hero_round nozoom" width="{{ .Width }}" height="{{ .Height }}" src="{{ .RelPermalink }}">
{{ end }}
{{ end }}
{{- end -}}