Skip to content

Commit ec6fd4d

Browse files
committed
Lazy loading for images
1 parent f757d96 commit ec6fd4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

html/place.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ <h1 class="name">{{ name }}</h1>
120120
{% if food_image_path.endswith('.webp') %}
121121
<source srcset="{{ food_image_path }}" type="image/webp">
122122
<source srcset="{{ food_image_path.replace('.webp', '.jpg') }}" type="image/jpeg">
123-
<img src="{{ food_image_path.replace('.webp', '.jpg') }}" alt="{{ alt_text }}" class="food-image">
123+
<img src="{{ food_image_path.replace('.webp', '.jpg') }}" alt="{{ alt_text }}" class="food-image" loading="lazy">
124124
{% else %}
125-
<img src="{{ food_image_path }}" alt="{{ alt_text }}" class="food-image">
125+
<img src="{{ food_image_path }}" alt="{{ alt_text }}" class="food-image" loading="lazy">
126126
{% endif %}
127127
</picture>
128128
{% endif %}

0 commit comments

Comments
 (0)