1
0
mirror of https://github.com/bitwarden/jslib synced 2026-01-11 21:13:27 +00:00
Files
jslib/angular/src/components/icon.component.html
Jake Howard 4252501620 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>
2022-02-04 12:38:56 +01:00

12 lines
280 B
HTML

<div class="icon" aria-hidden="true">
<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>