Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Add lazy loading to images in features template for improved performance

hangy5bb2f9fe4e92
diff --git a/wger/software/templates/features.html b/wger/software/templates/features.html
index d3be82a20..4afe83e6b 100644
--- a/wger/software/templates/features.html
+++ b/wger/software/templates/features.html
@@ -162,7 +162,8 @@
<source srcset="{% static 'images/screens-1.avif' %}" type="image/avif">
<img src="{% static 'images/screens-1.png' %}"
alt="mobile screen showing wger feature"
- class="img-fluid">
+ class="img-fluid"
+ loading="lazy">
</picture>
</div>
@@ -200,7 +201,8 @@
<source srcset="{% static 'images/screens-2.avif' %}" type="image/avif">
<img src="{% static 'images/screens-2.png' %}"
alt="mobile screen showing wger feature"
- class="img-fluid">
+ class="img-fluid"
+ loading="lazy">
</picture>
</div>
<div
@@ -239,7 +241,8 @@
<source srcset="{% static 'images/screens-3.avif' %}" type="image/avif">
<img src="{% static 'images/screens-3.png' %}"
alt="mobile screen showing wger feature"
- class="img-fluid">
+ class="img-fluid"
+ loading="lazy">
</picture>
</div>
<div
@@ -296,7 +299,8 @@
<img src="{% static 'images/community.png' %}"
width="500"
alt="list of human faces"
- class="img-fluid">
+ class="img-fluid"
+ loading="lazy">
</picture>
</div>
<div class="col-lg-5 col-sm-12">