From 272eba05254b050ad397b933efc158cd54ad7644 Mon Sep 17 00:00:00 2001 From: "Reed (Paperclip)" Date: Tue, 7 Jul 2026 00:10:08 +0000 Subject: [PATCH] fix(BUY-59983): add images.remotePatterns to next.config for catalog image hosts The /_next/image proxy returned HTTP 400 for every external product image because next.config.mjs had no images.remotePatterns allowlist. Add the upstream catalog image hosts the app actually renders via : picsum.photos (fallback), m.media-amazon.com + ssl-images-amazon (Amazon), cf/s.shopee.sg + *.shopee.sg (Shopee), images.unsplash.com. --- next.config.mjs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/next.config.mjs b/next.config.mjs index 391174225..03bf1b3cc 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -7,6 +7,23 @@ const nextConfig = { // of also returning 410. Middleware already handles 301 → non-slash for // valid pages, so this flag lets 410 pages pass through unchanged. output: 'standalone', + images: { + // BUY-59983: allow /_next/image proxy to fetch upstream catalog image hosts. + // Without this allowlist every with an external src returns HTTP 400. + remotePatterns: [ + // Placeholder/fallback images rendered by comparison + US product components + { protocol: 'https', hostname: 'picsum.photos' }, + // Amazon product catalog images + { protocol: 'https', hostname: 'm.media-amazon.com' }, + { protocol: 'https', hostname: 'images-na.ssl-images-amazon.com' }, + // Shopee catalog images (Singapore + cross-region CDN) + { protocol: 'https', hostname: 'cf.shopee.sg' }, + { protocol: 'https', hostname: 's.shopee.sg' }, + { protocol: 'https', hostname: '**.shopee.sg' }, + // Unsplash stock imagery (used by some landing/hero assets) + { protocol: 'https', hostname: 'images.unsplash.com' }, + ], + }, distDir: '.next-deploy', async redirects() { return [