Lazy load images

This commit is contained in:
rubenwardy
2023-08-25 20:49:55 +01:00
parent 210a0a10ae
commit 0649e5cf13
11 changed files with 32 additions and 14 deletions

View File

@@ -44,7 +44,7 @@
<div class="carousel-item {% if loop.index == 1 %}active{% endif %}">
<a href="{{ package.get_url('packages.view') }}">
<div class="ratio ratio-16x9">
<img src="{{ cover_image }}"
<img loading="lazy" src="{{ cover_image }}"
alt="{{ _('%(title)s by %(author)s', title=package.title, author=package.author.display_name) }}">
</div>
<div class="carousel-caption text-shadow">