fix(live-state): remove loading=lazy from avatars to fix Firefox/Safari flash

Firefox and Safari defer lazy images by one paint cycle even when cached,
causing a blank frame on each innerHTML swap. These avatars are always
in-viewport and cached after the first poll, so lazy loading has no benefit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
mwiegand 2026-05-12 23:34:53 +02:00
parent 175e4e653c
commit d113b7821c
No known key found for this signature in database

View file

@ -21,7 +21,7 @@
href="https://steamcommunity.com/profiles/{{ session.steam_id_64 }}"
target="_blank" rel="noopener noreferrer">
{% if profile and profile.avatar_url %}
<img class="avatar" src="{{ profile.avatar_url }}" alt="" loading="lazy">
<img class="avatar" src="{{ profile.avatar_url }}" alt="">
{% else %}
<span class="avatar placeholder" aria-hidden="true"></span>
{% endif %}
@ -45,7 +45,7 @@
href="https://steamcommunity.com/profiles/{{ row.steam_id_64 }}"
target="_blank" rel="noopener noreferrer">
{% if row.avatar_url %}
<img class="avatar" src="{{ row.avatar_url }}" alt="" loading="lazy">
<img class="avatar" src="{{ row.avatar_url }}" alt="">
{% else %}
<span class="avatar placeholder" aria-hidden="true"></span>
{% endif %}