diff --git a/.changeset/strong-scissors-shout.md b/.changeset/strong-scissors-shout.md new file mode 100644 index 000000000..e6ae677c0 --- /dev/null +++ b/.changeset/strong-scissors-shout.md @@ -0,0 +1,5 @@ +--- +"@headstartwp/next": patch +--- + +Fix: #861 wrapper removing custom images remotePatterns diff --git a/packages/next/src/config/withHeadstartWPConfig.ts b/packages/next/src/config/withHeadstartWPConfig.ts index b195ce310..e11e3b2a2 100644 --- a/packages/next/src/config/withHeadstartWPConfig.ts +++ b/packages/next/src/config/withHeadstartWPConfig.ts @@ -167,7 +167,7 @@ export function withHeadstartWPConfig( if (useImageRemotePatterns) { imageConfig.remotePatterns = - nextConfig.remotePatterns ?? + nextConfig?.images?.remotePatterns ?? imageDomains.map((each) => { return { hostname: each,