feat: Lazy load image in all places

This commit is contained in:
Tomy Hsieh
2023-05-27 05:26:57 +08:00
parent 159aaae1e5
commit adf7f6f224
8 changed files with 9 additions and 2 deletions
+1
View File
@@ -8,6 +8,7 @@
{{- if or (.Get "alt") (.Get "caption") }}
alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify | plainify }}{{ end }}"
{{- end -}}
loading="lazy"
width="100%"
height="auto"
style="max-width:{{ div $image.Width 2 }}px; max-height:{{ div $image.Height 2 }}px;"