Clean up Pop-Up JS

Fix missing Width and Height data stopping images from loading
This commit is contained in:
Michał Gdula 2023-03-10 15:55:34 +00:00
parent b0a9271265
commit feadaba8a1
5 changed files with 146 additions and 180 deletions

View file

@ -18,8 +18,10 @@
src="/api/uploads/{{ image.file_name }}?w=1000&h=1000"
onload="imgFade(this)" style="opacity:0;"
onerror="this.src='/static/images/error.png'"
width="{{ image.image_exif.File.Width.raw }}"
height="{{ image.image_exif.File.Height.raw }}"
{% if "File" in image.image_exif %}
width="{{ image.image_exif.File.Width.raw }}"
height="{{ image.image_exif.File.Height.raw }}"
{% endif %}
/>
</div>