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

View file

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