Lazy load images

This commit is contained in:
spikecodes 2021-09-06 12:02:52 -07:00
parent 6f88fdfc75
commit 52a1b45014
No known key found for this signature in database
GPG key ID: 004CECFF9B463BCB
7 changed files with 89 additions and 92 deletions

View file

@ -94,7 +94,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>
@ -121,7 +121,7 @@
<svg width="{{ post.thumbnail.width }}px" height="{{ post.thumbnail.height }}px" xmlns="http://www.w3.org/2000/svg">
<image width="100%" height="100%" href="{{ post.thumbnail.url }}"/>
<desc>
<img alt="Thumbnail" src="{{ post.thumbnail.url }}"/>
<img loading="lazy" alt="Thumbnail" src="{{ post.thumbnail.url }}"/>
</desc>
</svg>
{% endif %}