Use remote patterns over domains in next config images#1620
Conversation
Signed-off-by: prxt6529 <prxt@6529.io>
WalkthroughNext.js image configuration updated from deprecated Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
next.config.mjs (2)
149-149: Consider restrictinglocalhostto development environments.The
localhostpattern withhttpprotocol is included in all environments. While this is common for local development, it's unnecessary in production builds.Consider conditionally including this pattern only in development:
images: { loader: "default", remotePatterns: [ { protocol: "https", hostname: "6529.io" }, { protocol: "https", hostname: "staging.6529.io" }, { protocol: "https", hostname: "arweave.net" }, - { protocol: "http", hostname: "localhost" }, + ...(process.env.NODE_ENV === "development" + ? [{ protocol: "http", hostname: "localhost" }] + : []), { protocol: "https", hostname: "media.generator.seize.io" },
152-157: New remote patterns added correctly.The new image sources (OpenSea CDN, Cloudinary, and IPFS gateway) are correctly configured with HTTPS. These are legitimate CDN providers commonly used for NFT and user-generated content.
For enhanced security, you could optionally add
pathnamerestrictions to limit which paths are accessible:{ protocol: "https", hostname: "res.cloudinary.com", pathname: "/your-cloud-name/**" // Restrict to your Cloudinary account },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
next.config.mjs(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T08:37:14.939Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use `<Image>` from `next/image` instead of HTML `<img>` elements
📚 Learning: 2025-11-25T08:37:14.939Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T08:37:14.939Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use `<Image>` from `next/image` instead of HTML `<img>` elements
Applied to files:
next.config.mjs
📚 Learning: 2025-11-25T08:35:58.721Z
Learnt from: CR
Repo: 6529-Collections/6529seize-frontend PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-25T08:35:58.721Z
Learning: Applies to **/*.{ts,tsx,js,jsx} : Use NextJS features that match the current version
Applied to files:
next.config.mjs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
next.config.mjs (1)
145-158: Good migration toremotePatterns.The migration from the deprecated
domainsarray toremotePatternsfollows Next.js best practices and provides more granular control over remote image sources.Verified:
- Next.js version 16.0.0 fully supports
remotePatterns(introduced in Next.js 12.3.0)- Configuration is syntactically correct with 12 properly formatted patterns
- The deprecated
domainsarray has been fully removed<Image>components throughout the codebase actively load from these remote sources (IPFS, Arweave, Cloudinary, Seadn, etc.)



Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.