diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d3b7740f..6c8cda7af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Changed + +- Added fetchPriority and removed `data-vtex-preload` attribute in the `ProductImage` component. + ## [3.178.4] - 2025-09-30 ### Fixed diff --git a/react/components/ProductImages/components/ProductImage.tsx b/react/components/ProductImages/components/ProductImage.tsx index ffdc52711..9935a4341 100644 --- a/react/components/ProductImages/components/ProductImage.tsx +++ b/react/components/ProductImages/components/ProductImage.tsx @@ -94,7 +94,6 @@ const ProductImage: FC = ({ > = ({ alt={alt} title={alt} loading={index === 0 ? 'eager' : 'lazy'} + {...(index === 0 && { fetchPriority: 'high' })} // WIP // The value of the "sizes" attribute means: if the window has at most 64.1rem of width, // the image will be of a width of 100vw. Otherwise, the diff --git a/react/typings/jsx.d.ts b/react/typings/jsx.d.ts index 9b570f6b4..7f3ab97af 100644 --- a/react/typings/jsx.d.ts +++ b/react/typings/jsx.d.ts @@ -3,5 +3,6 @@ import 'react' declare module 'react' { interface ImgHTMLAttributes extends HTMLAttributes { loading?: 'lazy' | 'eager' | 'auto' + fetchPriority?: 'high' | 'low' | 'auto' } }