diff --git a/scripts/bundleSize/bundleSizeConfig.js b/scripts/bundleSize/bundleSizeConfig.js index 7ef6e70a3f4..1d1d5bcd514 100644 --- a/scripts/bundleSize/bundleSizeConfig.js +++ b/scripts/bundleSize/bundleSizeConfig.js @@ -9,5 +9,5 @@ export const VARIANCE = 5; -export const MIN_SIZE = 920; -export const MAX_SIZE = 1289; +export const MIN_SIZE = 914; +export const MAX_SIZE = 1282; diff --git a/src/app/components/Image/index.tsx b/src/app/components/Image/index.tsx index b0c995747c5..8c7d0d0a32b 100644 --- a/src/app/components/Image/index.tsx +++ b/src/app/components/Image/index.tsx @@ -98,6 +98,7 @@ const Image = ({ href={src} imageSrcSet={srcSet} imageSizes={sizes} + {...(fetchPriority && { fetchPriority })} /> )} diff --git a/src/app/components/ImageWithCaption/index.tsx b/src/app/components/ImageWithCaption/index.tsx index adad0b33dae..394f26f0c0e 100644 --- a/src/app/components/ImageWithCaption/index.tsx +++ b/src/app/components/ImageWithCaption/index.tsx @@ -95,6 +95,7 @@ const ImageWithCaption = ({ width={width} lazyLoad={lazyLoad} preload={shouldPreloadLeadImage} + fetchPriority={shouldPreloadLeadImage ? 'high' : undefined} srcSet={primarySrcset || undefined} fallbackSrcSet={fallbackSrcset || undefined} mediaType={primaryMimeType || undefined} diff --git a/webpack.config.client.js b/webpack.config.client.js index c4538e740d0..6acbbd67517 100644 --- a/webpack.config.client.js +++ b/webpack.config.client.js @@ -102,6 +102,9 @@ module.exports = ({ ecma: IS_LEGACY_WEB ? 5 : 2017, keep_classnames: IS_PROD_PROFILE, keep_fnames: IS_PROD_PROFILE, + compress: { + passes: 2, + }, }, }), ], diff --git a/ws-nextjs-app/integration/pages/articles/gahuza/__snapshots__/canonical.test.ts.snap b/ws-nextjs-app/integration/pages/articles/gahuza/__snapshots__/canonical.test.ts.snap index e6bc1b7cbf8..3f1e499a890 100644 --- a/ws-nextjs-app/integration/pages/articles/gahuza/__snapshots__/canonical.test.ts.snap +++ b/ws-nextjs-app/integration/pages/articles/gahuza/__snapshots__/canonical.test.ts.snap @@ -194,6 +194,7 @@ exports[`Canonical Articles Image should match snapshot 1`] = `