From 8f6a5821fe48a8726101cf1ba0805872b9e1b34b Mon Sep 17 00:00:00 2001 From: Amir Kakavand Date: Fri, 9 Aug 2024 12:31:21 +0330 Subject: [PATCH] modified next.config file to fix image loading issue from public directory --- next.config.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/next.config.mjs b/next.config.mjs index a53cd9d..072d850 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -13,7 +13,8 @@ const nextConfig = { { loader: '@next/font/google', options: { subsets: ['latin'] } }, ], }, - assetPrefix: process.env.NODE_ENV === 'production' ? '/Rick-and-Morty-Wiki/' : '', + assetPrefix: '/Rick-and-Morty-Wiki/', + basePath: '/Rick-and-Morty-Wiki/', }; // https://rickandmortyapi.com/api/character/avatar/1.jpeg