Skip to content

Commit 1e9fb3a

Browse files
Merge branch 'develop' into ju/support-node-22
Signed-off-by: Joel Uong <88680517+joeluong-sfcc@users.noreply.github.com>
2 parents 97672c1 + 81697ce commit 1e9fb3a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

packages/template-retail-react-app/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
- Allow store to be selectable in StoreLocator [#2187](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2187)
1010
- [BUG] Fixed "getCheckboxProps is not a function" when rendering checkout page in generated app.[#2140](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2140)
1111
- Replace transfer basket call with merge basket on checkout [#2138](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2138)
12+
- [BUG] Fix images being fetced multiple times on Safari [#2223](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2223)
1213
- Support Node 22 [#2218](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2218)
1314

15+
1416
### Accessibility Improvements
1517
- [a11y] Fix LinkList component to follow a11y practise [#2098])(https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2098)
1618

packages/template-retail-react-app/app/utils/responsive-image.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,13 @@ export const getResponsiveImageAttributes = ({src, widths, breakpoints = default
3838
themeBreakpoints = breakpoints
3939
breakpointLabels = getBreakpointLabels(themeBreakpoints)
4040

41+
// Order of these attributes matter! If src is not last, Safari will refetch images
42+
// multiple times (once when it processes src and again when it processes sizes / srcSet)
43+
// See https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2223
4144
return {
42-
src: getSrcWithoutOptionalParams(src),
4345
sizes: mapWidthsToSizes(widths),
44-
srcSet: mapWidthsToSrcSet(widths, src)
46+
srcSet: mapWidthsToSrcSet(widths, src),
47+
src: getSrcWithoutOptionalParams(src)
4548
}
4649
}
4750

0 commit comments

Comments
 (0)