mirror of
https://github.com/redlib-org/redlib.git
synced 2025-04-03 21:17:37 +03:00
Lazy load images
This commit is contained in:
parent
6f88fdfc75
commit
52a1b45014
7 changed files with 89 additions and 92 deletions
|
@ -63,7 +63,7 @@
|
|||
xmlns="http://www.w3.org/2000/svg">
|
||||
<image width="100%" height="100%" href="{{ post.media.url }}"/>
|
||||
<desc>
|
||||
<img alt="Post image" src="{{ post.media.url }}"/>
|
||||
<img loading="lazy" alt="Post image" src="{{ post.media.url }}"/>
|
||||
</desc>
|
||||
</svg>
|
||||
</a>
|
||||
|
@ -83,7 +83,7 @@
|
|||
<div class="gallery">
|
||||
{% for image in post.gallery -%}
|
||||
<figure>
|
||||
<a href="{{ image.url }}" ><img alt="Gallery image" src="{{ image.url }}"/></a>
|
||||
<a href="{{ image.url }}" ><img loading="lazy" alt="Gallery image" src="{{ image.url }}"/></a>
|
||||
<figcaption>
|
||||
<p>{{ image.caption }}</p>
|
||||
{% if image.outbound_url.len() > 0 %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue