Next.js Discord

Discord Forum

Next.js version 14.1.0 - Cannot find Public Images

Answered
fek posted this in #help-forum
Open in Discord
fekOP
I can't access my pictures in the public folder
Answered by Ray
try this config then
export const config = {
  matcher: [
    "/((?!api|_next/static|_next/image|favicon.ico|.*\\..*).*)",
  ],
};
View full answer

16 Replies

fekOP
There is a public folder and there is a picture in it, the path is correct.
@fek I can't access my pictures in the public folder
It can find the image but it return 400 bad request. Could you try with other image
fekOP
I think I realized the mistake I made. I wrote middleware for i18n
I think there is a problem here
I can't access the images because I blocked the _next folder
how can i fix this @Ray
@fek I can't access the images because I blocked the _next folder
I don't think this block it? maybe try rename your middleware to _middleware.ts
fekOP
<Image src='/next.svg' alt='' width={50} height={50} />
tried with a different image, still not working
@fek There is a public folder and there is a picture in it, the path is correct.
you don't have next.svg in the public folder
fekOP
i have image in public
fekOP
removed middleware brings up the image but this does not count as a solution
try this config then
export const config = {
  matcher: [
    "/((?!api|_next/static|_next/image|favicon.ico|.*\\..*).*)",
  ],
};
Answer