feat: Make image lazy load togglable

This commit is contained in:
Tomy Hsieh
2023-05-27 05:31:23 +08:00
parent adf7f6f224
commit 88c73a3aae
9 changed files with 44 additions and 10 deletions
+3 -1
View File
@@ -31,7 +31,9 @@
{{ end }}
{{ end }}
alt="{{ $.Params.featureAlt | default $.Params.coverAlt | default "" }}"
loading="lazy"
{{ if .Site.Params.enableImageLazyLoading | default true }}
loading="lazy"
{{ end }}
/>
{{ with $.Params.coverCaption }}
<figcaption class="mb-6 -mt-3 text-center">{{ . | markdownify }}</figcaption>