diff options
| -rw-r--r-- | layouts/_default/_markup/render-image.html | 2 | ||||
| -rw-r--r-- | layouts/shortcodes/figure.html | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index dec0559..ff5ada6 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -1,3 +1,3 @@ <p> - <img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}" {{ end }} /> + <img loading="lazy" src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}" {{ end }} /> </p> diff --git a/layouts/shortcodes/figure.html b/layouts/shortcodes/figure.html index 77f188e..8c93eff 100644 --- a/layouts/shortcodes/figure.html +++ b/layouts/shortcodes/figure.html @@ -5,7 +5,7 @@ {{- if .Get "link" -}} <a href="{{ .Get "link" }}"{{ with .Get "target" }} target="{{ . }}"{{ end }}{{ with .Get "rel" }} rel="{{ . }}"{{ end }}> {{- end }} - <img src="{{ .Get "src" }}{{- if eq (.Get "align") "center" }}#center{{- end }}" + <img loading="lazy" src="{{ .Get "src" }}{{- if eq (.Get "align") "center" }}#center{{- end }}" {{- if or (.Get "alt") (.Get "caption") }} alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" | markdownify| plainify }}{{ end }}" {{- end -}} |
