Skip to content

Comments

perf: bundle size, metadata, security headers, and image optimizations#53

Closed
adrienlupo wants to merge 1 commit intomainfrom
perf/audit-fixes
Closed

perf: bundle size, metadata, security headers, and image optimizations#53
adrienlupo wants to merge 1 commit intomainfrom
perf/audit-fixes

Conversation

@adrienlupo
Copy link
Contributor

Why

A performance audit identified several quick wins across bundle size, SSR architecture, asset delivery, and security hardening. These are all pure code changes that improve Lighthouse scores and overall page load performance.

What

Addresses all code-level findings from the audit: lazy-loads the heaviest JS dependency, migrates to the modern Next.js Metadata API, adds security headers, enables AVIF image format, and fixes misconfigured assets.

Changes

  • next.config.js: Disable X-Powered-By header, enable AVIF image format, add optimizePackageImports for HeadlessUI/Heroicons, add security headers (X-Content-Type-Options, X-Frame-Options, X-XSS-Protection, Referrer-Policy)
  • app/layout.tsx: Migrate from deprecated head.tsx to Next.js Metadata API (metadata export with title, description, OpenGraph, Twitter, icons, manifest), add display: "swap" to local font, remove <head /> from JSX
  • app/head.tsx: Deleted (superseded by Metadata API in layout.tsx)
  • app/components/Cover.tsx: Dynamic import for Rive animation (ssr: false) to remove ~310 KB from initial bundle
  • app/components/Values.tsx: Remove dead imports for non-existent SVG files
  • app/globals.css: Add prefers-reduced-motion: reduce media query for accessibility
  • public/favicons/site.webmanifest: Fix empty name/short_name, fix icon paths to include /favicons/ prefix
  • app/components/Portfolio.tsx: Add sizes attribute to all 6 portfolio images
  • app/components/Team.tsx: Add sizes attribute to all 3 team photos

Out of scope (separate PRs)

  • Recompressing team photos (1.15 MB -> 300 KB)
  • Converting scribble-note.ttf to WOFF2
  • Replacing HeadlessUI Disclosure with native <details>
  • Inlining heroicons SVGs

@vercel
Copy link

vercel bot commented Feb 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
website Building Building Preview Feb 17, 2026 3:27pm

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.

1 participant