Next Image is not loading in Login Page

22 views Asked by At

I am using next image to optimize images, and the image in my login page is not loading after deployment. However, its loading in local. The first suspect is the middleware, but the config matcher seems to be right. The image is in public directory. After login, the images are loading fine as usual.

export const config = {
  matcher: ['/((?!api|_next/static|_next/image|favicon.ico).*)'],
};

Below is the code where I am using it.

<Image
  src="/logo.png"
  priority
  alt="Logo"
  className="w-20"
  width={80}
  height={60}
/>

Github : https://github.com/adexh/NextERP/blob/0aef1952b3d83c58de54a61b2977c55023b53893/app/(login)/login/page.tsx#L11-L18

0

There are 0 answers