Add loading=lazy attribute

c353447d8e
This commit is contained in:
Aditya Telange 2024-05-26 13:31:37 +05:30
parent 4d06902bb1
commit 42cc219007
No known key found for this signature in database
GPG key ID: 82E844EF3DA99E77

View file

@ -12,7 +12,7 @@
{{- end -}}
{{- end -}}
{{- end -}}
{{- $attributes := merge .Attributes (dict "alt" .Text "src" $src "title" (.Title | transform.HTMLEscape)) -}}
{{- $attributes := merge .Attributes (dict "alt" .Text "src" $src "title" (.Title | transform.HTMLEscape) "loading" "lazy") -}}
<img
{{- range $k, $v := $attributes -}}
{{- if $v -}}