Skip to content

Commit 4e7a5ca

Browse files
Add loading attribute to image partial (#547)
1 parent 2ea4899 commit 4e7a5ca

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

layouts/partials/_elements/image.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
{{- with .data.align }} class="align-{{ . }}"{{ end -}}
44
{{- with .data.width }} width="{{ . }}"{{ end -}}
55
{{- with .data.height }} height="{{ . }}"{{ end -}}
6+
{{- with .data.loading }} loading="{{ . }}"{{ end -}}
67
>
78
{{- if .data.target }}</a>{{ end -}}

layouts/shortcodes/image.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
align = 'right'
2626
height = 200
2727
width = 200
28+
loading = 'lazy'
2829
{{< /image >}}
2930

3031
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

0 commit comments

Comments
 (0)