Perform lazy loading and async decoding of images in feed

This commit is contained in:
SondreB 2023-01-17 20:45:00 +01:00
parent a2fea2f72e
commit f1794f3c8c

View File

@ -1,6 +1,6 @@
<div class="content clickable" *ngIf="event"> <div class="content clickable" *ngIf="event">
<div class="event-images" *ngIf="images && images.length > 0"> <div class="event-images" *ngIf="images && images.length > 0">
<img class="event-image" [src]="image" (click)="expandImage(image)" *ngFor="let image of images" /> <img class="event-image" loading="lazy" decoding="async" [src]="image" (click)="expandImage(image)" *ngFor="let image of images" />
</div> </div>
<div class="event-videos" *ngIf="videos && videos.length > 0"> <div class="event-videos" *ngIf="videos && videos.length > 0">
<iframe id="ytplayer" class="event-video" type="text/html" *ngFor="let video of videos" [src]="video" frameborder="0"></iframe> <iframe id="ytplayer" class="event-video" type="text/html" *ngFor="let video of videos" [src]="video" frameborder="0"></iframe>