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
@@ -23,7 +23,9 @@
160w, {{- (.Fill "320x240 smart").RelPermalink }} 2x"
src="{{ (.Fill "160x120 smart").RelPermalink }}"
{{ end }}
loading="lazy"
{{ if .Site.Params.enableImageLazyLoading | default true }}
loading="lazy"
{{ end }}
/>
</a>
</div>