Add lazy loading

This commit is contained in:
Jay Trees 2022-02-23 15:23:14 +01:00
parent cfc06e10d0
commit 2861e4111d
2 changed files with 4 additions and 4 deletions

View file

@ -93,7 +93,7 @@ $(function() {
if (!elementImage.length) {
card.prepend(
'<div class="image">' +
'<img src="' + info.image + '">' +
'<img src="' + info.image + '" loading="lazy">' +
'</div>'
);
}
@ -108,7 +108,7 @@ $(function() {
/** Favicon */
if (info.favicon) {
elementContentHeader.prepend(
'<img src="' + info.favicon + '">'
'<img src="' + info.favicon + '" loading="lazy">'
);
}

View file

@ -89,7 +89,7 @@ class Wishlist
<?php if ($info->image) { ?>
<div class="image">
<img src="<?= $info->image ?>" />
<img src="<?= $info->image ?>" loading="lazy"/>
</div>
<?php } ?>
@ -97,7 +97,7 @@ class Wishlist
<?php if ($info->title) { ?>
<div class="header">
<?php if ($info->favicon) { ?>
<img src="<?= $info->favicon ?>" />
<img src="<?= $info->favicon ?>" loading="lazy"/>
<?php } ?>
<?php if ($info->url) { ?>