1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-26 12:25:20 +01:00

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

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>