diff --git a/src/app/features/store/pages/store-home-page/store-home-page.component.html b/src/app/features/store/pages/store-home-page/store-home-page.component.html
index 697aa4c..f57c312 100644
--- a/src/app/features/store/pages/store-home-page/store-home-page.component.html
+++ b/src/app/features/store/pages/store-home-page/store-home-page.component.html
@@ -22,7 +22,7 @@
No hay productos disponibles en este momento.
} @else {
- @for (group of catalog(); track group.id) {
+ @for (group of catalog(); track group.id; let first = $first) {
}
diff --git a/src/app/shared/components/product-list/product-list.component.spec.ts b/src/app/shared/components/product-list/product-list.component.spec.ts
index 32ecc20..7f3ca15 100644
--- a/src/app/shared/components/product-list/product-list.component.spec.ts
+++ b/src/app/shared/components/product-list/product-list.component.spec.ts
@@ -143,6 +143,14 @@ describe('ProductListComponent', () => {
expect(element.querySelector('.product-list--column')).not.toBeNull();
expect(element.querySelectorAll('app-product-column-with-image')).toHaveLength(2);
+ expect(element.querySelectorAll('img[fetchpriority="high"]')).toHaveLength(1);
+ });
+
+ it('does not prioritize images rendered in a circular carousel', async () => {
+ const fixture = await render('column_with_image', items, 'carousel');
+ const element = fixture.nativeElement as HTMLElement;
+
+ expect(element.querySelectorAll('img[fetchpriority="high"]')).toHaveLength(0);
});
it('renders cart products next to each other in the column grid', async () => {
diff --git a/src/app/shared/components/product-list/product-list.component.ts b/src/app/shared/components/product-list/product-list.component.ts
index e8c3139..e938dea 100644
--- a/src/app/shared/components/product-list/product-list.component.ts
+++ b/src/app/shared/components/product-list/product-list.component.ts
@@ -68,6 +68,7 @@ export class ProductListComponent {
readonly items = input.required();
readonly loading = input(false);
readonly loadImages = input(true);
+ readonly prioritizeFirstImage = input(true);
readonly unavailableVariantIds = input>(new Set());
readonly savingProductIds = input>(new Set());