Issue accessing static files in Next.js with dynamic routes in App Router #67246
Unanswered
JuanSpada
asked this question in
App Router
Replies: 3 comments
-
Beta Was this translation helpful? Give feedback.
0 replies
-
Yes If I use next image works. But If I go to that URL directly instead of compiling it with Next.js Im having that issue. I need it to work also when I go to https://localhost:3000/images/img.png So I can use that img on my emails. Thanks |
Beta Was this translation helpful? Give feedback.
0 replies
-
............................... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working on a Next.js application and encountering an issue when trying to access static files while using dynamic routes in the App Router.
My project structure is as follows:
When I try to access the static file at localhost:3000/images/img.png, I get an error indicating that the companyslug is not found, as if Next.js is trying to interpret the /images/img.png path as a dynamic route.
Is there a way to configure Next.js to properly serve the static files from the public directory without conflicting with the dynamic routes?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions