Skip to content

Commit b59f574

Browse files
committed
feat: set fetchpriority and lazy loading for images
1 parent 09a4893 commit b59f574

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

projects/stream-chat-angular/src/lib/attachment-list/attachment-list.component.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@
106106
"
107107
>
108108
<img
109+
fetchpriority="low"
110+
loading="lazy"
109111
#imgElement
110112
[src]="
111113
getImageAttachmentConfiguration(
@@ -334,6 +336,8 @@
334336
class="str-chat__message-attachment-card--header"
335337
>
336338
<img
339+
fetchpriority="low"
340+
loading="lazy"
337341
data-testclass="card-img"
338342
alt="{{ attachmentConfiguration.url }}"
339343
src="{{ attachmentConfiguration.url }}"

projects/stream-chat-angular/src/lib/avatar/avatar.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
objectFit: 'cover',
2828
width: 'calc(var(--str-chat__spacing-px, 1px) * ' + size + ')'
2929
}"
30+
fetchpriority="high"
3031
/>
3132
<ng-template #fallback>
3233
<div

0 commit comments

Comments
 (0)