mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 03:26:16 +00:00
Optimise loading and reduce image size
This commit is contained in:
parent
df2b2091ec
commit
16df5bc255
9 changed files with 59 additions and 25 deletions
|
@ -126,7 +126,14 @@
|
|||
<div class="images size-{{ group.images|length }}">
|
||||
{% if group.images|length > 0 %}
|
||||
{% for image in group.images %}
|
||||
<img data-src="{{ url_for('media_api.media', path='uploads/' + image.filename) }}?r=thumb" onload="this.classList.add('loaded');" id="lazy-load" class="data-{{ loop.index }}" {% if image.alt %}{{ image.alt }}{% else %}Image Thumbnail{% endif %}/>
|
||||
<img
|
||||
data-src="{{ url_for('media_api.media', path='uploads/' + image.filename) }}?r=thumb"
|
||||
onload="imgFade(this)"
|
||||
style="opacity:0;"
|
||||
id="lazy-load"
|
||||
class="data-{{ loop.index }}"
|
||||
{% if image.alt %}{{ image.alt }}{% else %}Image Thumbnail{% endif %}
|
||||
/>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<img src="{{ url_for('static', filename='error.png') }}" class="loaded" alt="Error thumbnail"/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue