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

@ -84,7 +84,12 @@
{% endblock %}
{% block content %}
<div class="background">
<img src="{{ url_for('media_api.media', path='uploads/' + image.filename) }}?r=prev" alt="{{ image.alt }}" onload="imgFade(this)" style="opacity:0;"/>
<img
src="{{ url_for('media_api.media', path='uploads/' + image.filename) }}?r=prev"
alt="{{ image.alt }}"
onload="imgFade(this)"
style="opacity:0;"
/>
<span></span>
</div>
<div class="image-grid">
@ -94,7 +99,7 @@
src="{{ url_for('media_api.media', path='uploads/' + image.filename) }}?r=prev"
alt="{{ image.alt }}"
onload="imgFade(this)"
style="opacity: 0;"
style="opacity:0;"
onerror="this.src='{{ url_for('static', filename='error.png')}}'"
{% if "File" in image.exif %}
width="{{ image.exif.File.Width.raw }}"