Skip to content

Commit 17ce1b8

Browse files
committed
lazy load more images
1 parent 3595c71 commit 17ce1b8

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

_includes/index/learn_block.html

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
<div class="image">
22
{% assign guide = site.data.guides[include.index] %}
3-
<img class="image-headline" alt="{{ guide.image_alt_attribute }}"
4-
src="{{ guide.image }}"
5-
/>
3+
<img class="image-headline"
4+
alt="{{ guide.image_alt_attribute }}"
5+
src="{{ guide.image }}"
6+
loading="lazy" />
67
<span class="image-title">
78
<span>
89
<p><a href="{{ guide.guide_url }}">{{ guide.title }} by {{ guide.author }}</a></p>
910
</span>
1011
<img alt="Made with CircuitPython Logo"
11-
src="{{ "assets/images/made_with_circuitpython.svg" |
12-
relative_url }}"
13-
/>
12+
src="{{ "assets/images/made_with_circuitpython.svg" |
13+
relative_url }}"
14+
loading="lazy" />
1415
</span>
1516
</div>

index.html

+8-4
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ <h2>When we say easy, we mean it.</h2>
3636
<div>
3737
<img alt="Brain Circuit Icon"
3838
src="{{ "assets/images/icons/brain-circuit.svg" |
39-
relative_url }}" />
39+
relative_url }}"
40+
loading="lazy" />
4041
<div>
4142
<h3>Beginner Friendly</h3>
4243
<p>
@@ -47,7 +48,8 @@ <h3>Beginner Friendly</h3>
4748
<div>
4849
<img alt="Microchip Icon"
4950
src="{{ "assets/images/icons/microchip.svg" |
50-
relative_url }}" />
51+
relative_url }}"
52+
loading="lazy" />
5153
<div>
5254
<h3>File Storage</h3>
5355
<p>
@@ -58,7 +60,8 @@ <h3>File Storage</h3>
5860
<div>
5961
<img alt="Files Icon"
6062
src="{{ "assets/images/icons/files.svg" |
61-
relative_url }}" />
63+
relative_url }}"
64+
loading="lazy" />
6265
<div>
6366
<h3>Easy Code Updates</h3>
6467
<p>
@@ -70,7 +73,8 @@ <h3>Easy Code Updates</h3>
7073
<div>
7174
<img alt="Terminal Icon"
7275
src="{{ "assets/images/icons/terminal.svg" |
73-
relative_url }}" />
76+
relative_url }}"
77+
loading="lazy" />
7478
<div>
7579
<h3>Serial Console + REPL</h3>
7680
<p>

0 commit comments

Comments
 (0)