Merge pull request #13490 from FarisKarim/fix_13486

add lazy loading for images
This commit is contained in:
Hypolite Petovan 2023-10-02 12:55:26 -04:00 committed by GitHub
commit 3c20ffc22b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
{{if $image.preview}}
<a data-fancybox="{{$image.uri_id}}" href="{{$image.attachment.url}}"><img src="{{$image.preview}}" alt="{{$image.attachment.description}}" title="{{$image.attachment.description}}"></a>
<a data-fancybox="{{$image.uri_id}}" href="{{$image.attachment.url}}"><img src="{{$image.preview}}" alt="{{$image.attachment.description}}" title="{{$image.attachment.description}}" loading="lazy"></a>
{{else}}
<img src="{{$image.src}}" alt="{{$image.attachment.description}}" title="{{$image.attachment.description}}">
<img src="{{$image.src}}" alt="{{$image.attachment.description}}" title="{{$image.attachment.description}}" loading="lazy">
{{/if}}