Skip to content

Commit

Permalink
lazy loading for images
Browse files Browse the repository at this point in the history
  • Loading branch information
mambusskruj committed Mar 11, 2024
1 parent 30772fb commit 8b81fcb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions layouts/_default/_markup/render-image.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
src="{{ $image.RelPermalink }}"
alt="{{ $.PlainText }}"
title="{{ $.Title }}"
loading="lazy"
{{- if gt (len $srcset) 0 -}}
{{- (printf " srcset=\"%s\"" (delimit $srcset ", ")) | safeHTMLAttr -}}
{{- (printf " sizes=\"%s\"" (delimit $sizestag ", ")) | safeHTMLAttr -}}
Expand Down

0 comments on commit 8b81fcb

Please sign in to comment.