Lazy load all message images

This commit is contained in:
the-djmaze 2022-09-26 10:58:46 +02:00
parent 0953d0d76e
commit c6652ba9b4

View file

@ -230,6 +230,7 @@ export const
delAttribute('src');
if ('IMG' === name) {
oElement.loading = 'lazy';
let attachment;
if (detectHiddenImages
&& (('' != getAttribute('height') && 3 > pInt(getAttribute('height')))
@ -248,7 +249,6 @@ export const
else if ((attachment = findLocationByCid(value)))
{
if (attachment.download) {
oElement.loading = 'lazy';
oElement.src = attachment.linkPreview();
attachment.isLinked(true);
}