aboutsummaryrefslogtreecommitdiffhomepage
path: root/template/html/entry.html
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2019-09-10 21:12:38 -0700
committerGravatar Frédéric Guillot <fred@miniflux.net>2019-09-10 21:22:19 -0700
commit8d8f78241d303381abf6879cc007ca9cbc2a12e2 (patch)
tree9c6b8028bd0ff04e2fc6b26992c6de61336b10be /template/html/entry.html
parent937492f6f554d51d8cae62829b6229071cac994e (diff)
Add native lazy loading for images and iframes
This feature is available only in Chrome >= 76 for now. See https://web.dev/native-lazy-loading
Diffstat (limited to 'template/html/entry.html')
-rw-r--r--template/html/entry.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/template/html/entry.html b/template/html/entry.html
index 7e57390..b10cea6 100644
--- a/template/html/entry.html
+++ b/template/html/entry.html
@@ -57,7 +57,7 @@
<div class="entry-meta">
<span class="entry-website">
{{ if ne .entry.Feed.Icon.IconID 0 }}
- <img src="{{ route "icon" "iconID" .entry.Feed.Icon.IconID }}" width="16" height="16" alt="{{ .entry.Feed.Title }}">
+ <img src="{{ route "icon" "iconID" .entry.Feed.Icon.IconID }}" width="16" height="16" loading="lazy" alt="{{ .entry.Feed.Title }}">
{{ end }}
<a href="{{ route "feedEntries" "feedID" .entry.Feed.ID }}">{{ .entry.Feed.Title }}</a>
</span>
@@ -105,7 +105,7 @@
</div>
{{ else if hasPrefix .MimeType "image/" }}
<div class="enclosure-image">
- <img src="{{ proxyURL .URL }}" title="{{ .URL }} ({{ .MimeType }})" alt="{{ .URL }} ({{ .MimeType }})">
+ <img src="{{ proxyURL .URL }}" title="{{ .URL }} ({{ .MimeType }})" loading="lazy" alt="{{ .URL }} ({{ .MimeType }})">
</div>
{{ end }}