Lazy load blog images

This commit is contained in:
grandeljay 2022-06-10 17:07:06 +02:00
parent b9372e71f3
commit b55715a688

View file

@ -77,7 +77,7 @@ class Blog
<source srcset="<?= $image->source_url ?> <?= $image->width ?>w" type="<?= $image->mime_type ?>" media="(max-width: <?= $image->width ?>px)" /> <source srcset="<?= $image->source_url ?> <?= $image->width ?>w" type="<?= $image->mime_type ?>" media="(max-width: <?= $image->width ?>px)" />
<?php } ?> <?php } ?>
<img src="<?= $media->source_url; ?>" alt="<?= $media->alt_text; ?>" /> <img src="<?= $media->source_url; ?>" alt="<?= $media->alt_text; ?>" loading="lazy" />
</picture> </picture>
<?php <?php
$htmlPicture .= ob_get_clean(); $htmlPicture .= ob_get_clean();