mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-10-09 13:17:32 +08:00
Lazy load all message images
This commit is contained in:
parent
0953d0d76e
commit
c6652ba9b4
1 changed files with 1 additions and 1 deletions
|
@ -230,6 +230,7 @@ export const
|
||||||
delAttribute('src');
|
delAttribute('src');
|
||||||
|
|
||||||
if ('IMG' === name) {
|
if ('IMG' === name) {
|
||||||
|
oElement.loading = 'lazy';
|
||||||
let attachment;
|
let attachment;
|
||||||
if (detectHiddenImages
|
if (detectHiddenImages
|
||||||
&& (('' != getAttribute('height') && 3 > pInt(getAttribute('height')))
|
&& (('' != getAttribute('height') && 3 > pInt(getAttribute('height')))
|
||||||
|
@ -248,7 +249,6 @@ export const
|
||||||
else if ((attachment = findLocationByCid(value)))
|
else if ((attachment = findLocationByCid(value)))
|
||||||
{
|
{
|
||||||
if (attachment.download) {
|
if (attachment.download) {
|
||||||
oElement.loading = 'lazy';
|
|
||||||
oElement.src = attachment.linkPreview();
|
oElement.src = attachment.linkPreview();
|
||||||
attachment.isLinked(true);
|
attachment.isLinked(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue