Skip to content

chore: uses images.remotePatterns instead of deprecated domains - #3266

Merged
hellofanny merged 1 commit into
canary-v2from
chore/replace-images-domain-deprecated
May 4, 2026
Merged

hellofanny merged 1 commit into
canary-v2from
chore/replace-images-domain-deprecated

Conversation

@hellofanny

@hellofanny hellofanny commented Apr 9, 2026 •

Copy link
Copy Markdown
Contributor

What's the purpose of this pull request?

In Next.js Version 14, domains configuration has been deprecated in favour of remotePatterns.

How it works?

Migrate from images.domains to images.remotePatterns in next.config.js file

How to test it?

Locally and in the preview deployment, remote images behave the same as before the images.remotePatterns change (load correctly, no regressions).

Starters Deploy Preview

https://sfj-cfc4309--brandless.preview.vtex.app/
PR

References

https://nextjs.org/docs/messages/next-image-unconfigured-host

Summary by CodeRabbit

  • Chores
    • Updated image configuration settings for enhanced compatibility and security with image serving infrastructure.

@hellofanny
hellofanny requested a review from a team as a code owner April 9, 2026 20:55
@hellofanny
hellofanny requested review from lemagnetic and lucasfp13 and removed request for a team April 9, 2026 20:55
@coderabbitai

coderabbitai Bot commented Apr 9, 2026 •

Copy link
Copy Markdown
Contributor

Walkthrough

The PR updates Next.js image configuration in packages/core/next.config.js, replacing the deprecated images.domains setting with images.remotePatterns to explicitly enforce HTTPS protocol and permit all paths from the VTEX assets domain.

Changes

Cohort / File(s) Summary
Next.js Image Configuration
packages/core/next.config.js
Migrated from images.domains to images.remotePatterns for stricter HTTPS enforcement on VTEX assets hostname with universal path matching.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🖼️ From domains loose to patterns tight,
HTTPS shines with guarded light,
Config blessed with modern way,
Assets flow secure today! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: migrating from deprecated images.domains to images.remotePatterns in Next.js configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/replace-images-domain-deprecated

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codesandbox-ci

codesandbox-ci Bot commented Apr 9, 2026

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@hellofanny hellofanny self-assigned this Apr 9, 2026
@hellofanny
hellofanny merged commit 968d8da into canary-v2 May 4, 2026
4 checks passed
@hellofanny
hellofanny deleted the chore/replace-images-domain-deprecated branch May 4, 2026 17:03
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