Enable Next.js image optimization across ~60 remaining unoptimized <Image> spots
- Remove `unoptimized` from every Image that was pointing at a real remote/ static file (Reels image carousel, story avatars/viewer, shop product grids/details, chat shared-post/product/story bubbles, notification/ visitor rows, tag/mention pickers, etc.) so Next's own resize+avif/webp pipeline (already configured in next.config.ts) actually applies — previously only a handful of components used it, everything else shipped full-resolution originals regardless of the tiny thumbnail size shown - Add a `sizes` prop wherever `fill` was used without one, so the optimizer picks an appropriately small srcset entry instead of defaulting to 100vw - Fix ProfileAvatar to request the actual displayed size instead of always requesting 280x280 regardless of the `size` prop - Left `unoptimized` on the handful of genuinely local/ephemeral sources (blob:/data: URIs from in-progress uploads, third-party QR API images, static SVG icons) where Next's optimizer can't or shouldn't apply - Add next-story prefetch to StoryViewer (previously only Reels prefetched upcoming media; swiping to the next story always cold-started before) - Fix .claude/launch.json's dev server port (3000 -> 3004) to match package.json's actual `next dev --port 3004` Verified via `tsc --noEmit` (no new errors) and by diffing this app's console/network behavior against a git-stashed baseline in the browser preview — the one pre-existing hydration warning and 401s (unauthenticated session) are present on both, and /_next/image requests now succeed for avatars/thumbnails that previously bypassed optimization entirely. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
"name": "modstagram-next-dev",
|
||||
"runtimeExecutable": "npm",
|
||||
"runtimeArgs": ["run", "dev"],
|
||||
"port": 3000
|
||||
"port": 3004
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user