Optimise loading and reduce image size

This commit is contained in:
Michał Gdula 2023-04-22 10:29:57 +00:00
parent df2b2091ec
commit 16df5bc255
9 changed files with 59 additions and 25 deletions

View file

@ -75,7 +75,14 @@
<div class="image-filter">
<p class="image-title"><span class="time">{{ image.created_at }}</span></p>
</div>
<img fetchpriority="low" alt="{{ image.alt }}" data-src="{{ url_for('media_api.media', path='uploads/' + image.filename) }}?r=thumb" onload="this.classList.add('loaded');" id="lazy-load"/>
<img
fetchpriority="low"
alt="{{ image.alt }}"
data-src="{{ url_for('media_api.media', path='uploads/' + image.filename) }}?r=thumb"
onload="imgFade(this)"
style="opacity:0;"
id="lazy-load"
/>
</a>
{% endfor %}
</div>