From 2fdfddf9f1eb48cfffe08994e299cd0592687a8b Mon Sep 17 00:00:00 2001 From: Euan Caskie <56805259+Ortovoxx@users.noreply.github.com> Date: Fri, 8 Mar 2024 21:25:27 +0000 Subject: [PATCH] Use latest api https://nextjs.org/docs/pages/api-reference/components/image#configuration-options --- next.config.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/next.config.js b/next.config.js index 9e69227..3421205 100644 --- a/next.config.js +++ b/next.config.js @@ -6,9 +6,20 @@ const nextConfig = { reactStrictMode: true, swcMinify: true, images: { - domains: ['localhost', process.env.NEXT_PUBLIC_SERVER_URL, 'society.ecs.soton.ac.uk'] - .filter(Boolean) - .map(url => url.replace(/https?:\/\//, '')), + remotePatterns: [ + { + protocol: 'https', + hostname: 'society.ecs.soton.ac.uk', + }, + { + protocol: 'https', + hostname: process.env.NEXT_PUBLIC_SERVER_URL, + }, + { + protocol: 'http', + hostname: 'localhost', + }, + ], }, redirects, async headers() {