diff options
| author | ilotterytea <iltsu@alright.party> | 2025-12-11 01:11:23 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-12-11 01:11:23 +0500 |
| commit | c79bb71e7694d4674c28a7e1192dd644e41fbfdb (patch) | |
| tree | 857e40e34ecb6a79f32945c2b571ab44e4c64ab1 /lib/emote.php | |
| parent | e8b0b4769d013862a54c273931ac4456c486e9ab (diff) | |
fix: use lazy loading for emotes
Diffstat (limited to 'lib/emote.php')
| -rw-r--r-- | lib/emote.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/emote.php b/lib/emote.php index 14f6088..4ad71c4 100644 --- a/lib/emote.php +++ b/lib/emote.php @@ -268,7 +268,7 @@ function html_display_emotes(array $emotes, int $scale = 3) // icon echo '<div class="flex justify-center items-center grow emote-icon">'; $scale = $emote_wall ? "3" : ((string) $scale); - echo "<img src='/static/userdata/emotes/{$e->id}/{$scale}x.webp' alt='{$e->code}' />"; + echo "<img src='/static/userdata/emotes/{$e->id}/{$scale}x.webp' alt='{$e->code}' loading='lazy' />"; echo '</div>'; // info @@ -299,7 +299,7 @@ function html_display_emoteset(array $emotesets) echo '<div class="small-gap row">'; foreach ($es->emotes as $e) { - echo "<img src='/static/userdata/emotes/{$e->id}/1x.webp' alt='{$e->code}' title='{$e->code}' height='16' />"; + echo "<img src='/static/userdata/emotes/{$e->id}/1x.webp' alt='{$e->code}' title='{$e->code}' height='16' loading='lazy' />"; } echo '</div></a>'; |
