aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2022-04-17 06:01:45 +0000
committerr <r@freesoftwareextremist.com>2022-04-17 06:01:45 +0000
commitb6c09b4fc61b9b5e3bb66f7926d2455ab921f5c2 (patch)
treeac8fd583b683b7827148e39e2ebedafb1342ba2b
parenta38d29a43592601d37d671db8748f0980071c0c4 (diff)
downloadbloat-b6c09b4fc61b9b5e3bb66f7926d2455ab921f5c2.tar.gz
bloat-b6c09b4fc61b9b5e3bb66f7926d2455ab921f5c2.zip
Lazy load images on emoji page
Makes the emoji page usable for instances with 1000+ emojis. The attribute is considered experimental by Mozilla, but is supported by most of the modern browsers.
-rw-r--r--templates/emoji.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/emoji.tmpl b/templates/emoji.tmpl
index ee84522..4b07e81 100644
--- a/templates/emoji.tmpl
+++ b/templates/emoji.tmpl
@@ -6,7 +6,7 @@
{{range .Emojis}}
<div class="emoji-item-container">
<div class="emoji-item">
- <img class="emoji" src="{{.URL}}" alt="{{.ShortCode}}" height="32" />
+ <img class="emoji" src="{{.URL}}" alt="{{.ShortCode}}" height="32" loading="lazy" />
<span title=":{{.ShortCode}}:" class="emoji-shortcode">:{{.ShortCode}}:</span>
</div>
</div>