Add lazy loading and decoding to images (#591)

The lazy loading will work in addition to any already being done, rather
than conflicting with it.

Co-authored-by: Daniel James Smith <djsmith@web.de>
This commit is contained in:
Jake Howard 2022-02-04 11:38:56 +00:00 committed by GitHub
parent ec9559520b
commit 4252501620
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -1,4 +1,11 @@
<div class="icon" aria-hidden="true">
<img [src]="image" appFallbackSrc="{{ fallbackImage }}" *ngIf="imageEnabled && image" alt="" />
<img
[src]="image"
appFallbackSrc="{{ fallbackImage }}"
*ngIf="imageEnabled && image"
alt=""
decoding="async"
loading="lazy"
/>
<i class="bwi bwi-fw bwi-lg {{ icon }}" *ngIf="!imageEnabled || !image"></i>
</div>