Skip to content

Conversation

@DmitryGron
Copy link
Contributor

@DmitryGron DmitryGron commented Jan 6, 2026

Resolves JIRA:

Summary

adding few suggested by lighthouse improvements and other experimental improvements
Changes

  1. Image Priority for LCP
    Files:
  • 'src/app/components/Image/index.tsx'
  • 'src/app/components/ImageWithCaption/index.tsx'

Added conditional 'fetchPriority="high"' to hero images so browser downloads them first.

Code:
'tsx
// Image component - conditional fetchPriority in preload link
{...(fetchPriority && { fetchPriority })}

// ImageWithCaption - pass fetchPriority to lead images
fetchPriority={shouldPreloadLeadImage ? 'high' : undefined}
'

Why: Improves Largest Contentful Paint (LCP) by prioritizing hero image download.


  1. Terser 2-Pass Compression
    File: 'webpack.config.client.js'

Enabled 2-pass Terser compression (default is 1 pass).

Code:
'js
compress: {
passes: 2,
}
'

Why: Better minification through multiple compression passes.


  1. Bundle Size Baseline
    File: 'scripts/bundleSize/bundleSizeConfig.js'

Updated MAX_SIZE from 1312 to 1295 kB.

Why: Locks in 17KB bundle size reduction, prevents future regressions.


  1. Test Snapshots
    Files: 10 integration test snapshot files

Updated snapshots for images now having 'fetchpriority="high"' attribute.

Why: Intentional DOM change from LCP optimization.


Result

  • Bundle size: -17 kB (-1.3%)
  • Hero images load faster ('fetchPriority="high"')
  • Better minification (2-pass Terser compression)

Developer Checklist

  • UX
    • UX Criteria met (visual UX & screenreader UX)
  • Accessibility
    • Accessibility Acceptance Criteria met
    • Accessibility swarm completed
    • Component Health updated
    • P1 accessibility bugs resolved
    • P2/P3 accessibility bugs planned (if not resolved)
  • Security
    • Security issues addressed
    • Threat Model updated
  • Documentation
    • Docs updated (runbook, READMEs)
  • Testing
    • Feature tested on relevant environments
  • Comms
    • Relevant parties notified of changes

Testing

  • Manual Testing required?
    • Local (Ready-For-Test, Local)
    • Test (Ready-For-Test, Test)
    • Preview (Ready-For-Test, Preview)
    • Live (Ready-For-Test, Live)
  • Manual Testing complete?
    • Local
    • Test
    • Preview
    • Live

Additional Testing Steps

  1. List the steps required to test this PR.

Useful Links

@DmitryGron DmitryGron requested a review from andrewscfc January 8, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants