feat(carousel): enhance image loading strategy and improve product display in carousel

This commit is contained in:
2026-07-23 14:44:52 -03:00
parent b04c33bbff
commit 67702ffdd7
8 changed files with 127 additions and 6 deletions

View File

@@ -15,11 +15,14 @@
<img
class="main-carousel__image"
[class.main-carousel__image--active]="index === activeIndex()"
[src]="image"
[attr.src]="imageSource(image, index)"
[alt]="imageAlt(index)"
[attr.aria-hidden]="index === activeIndex() ? null : 'true'"
[attr.loading]="index === 0 ? 'eager' : 'lazy'"
loading="eager"
[attr.fetchpriority]="index === activeIndex() ? 'high' : 'low'"
draggable="false"
(load)="handleImageLoad(index)"
(error)="handleImageError(index)"
/>
}
</div>