Lazy load images

This commit is contained in:
Joakim Hellsén 2026-01-07 22:33:49 +01:00
commit da923f82da
No known key found for this signature in database
3 changed files with 3 additions and 0 deletions

View file

@ -136,6 +136,7 @@
{% if benefit.image_asset_url %} {% if benefit.image_asset_url %}
<img height="160" <img height="160"
width="160" width="160"
loading="lazy"
style="object-fit: cover; style="object-fit: cover;
margin-right: 3px" margin-right: 3px"
src="{{ benefit.image_best_url|default:benefit.image_asset_url }}" src="{{ benefit.image_best_url|default:benefit.image_asset_url }}"

View file

@ -55,6 +55,7 @@
<div style="flex-shrink: 0;"> <div style="flex-shrink: 0;">
{% if game_group.grouper.box_art_best_url %} {% if game_group.grouper.box_art_best_url %}
<img src="{{ game_group.grouper.box_art_best_url }}" <img src="{{ game_group.grouper.box_art_best_url }}"
loading="lazy"
alt="Box art for {{ game_group.grouper.display_name }}" alt="Box art for {{ game_group.grouper.display_name }}"
width="120" width="120"
height="160" height="160"

View file

@ -25,6 +25,7 @@
{% if item.game.box_art_best_url %} {% if item.game.box_art_best_url %}
<img src="{{ item.game.box_art_best_url }}" <img src="{{ item.game.box_art_best_url }}"
alt="Box art for {{ item.game.display_name }}" alt="Box art for {{ item.game.display_name }}"
loading="lazy"
width="180" width="180"
height="240" height="240"
style="border-radius: 8px" /> style="border-radius: 8px" />