Lazy load blog images
This commit is contained in:
parent
b9372e71f3
commit
b55715a688
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue