Answer the question
In order to leave comments, you need to log in
How can I make Next js, in BUILD mode, notice new images in the public folder?
The project has a text editor. We use Next js. But after running it in prod. mode, and adding a new publication, the new publication is pulled from the database and shown, but the images are not loaded. When checking the desired folder is public, all image files are present and should appear as they were in dev. mode? I suspect that the paths to the files are registered somewhere. Is there any way to trigger a conditional render of a new post to recognize the images?
Answer the question
In order to leave comments, you need to log in
docs
Only assets that are in the public directory at build time will be served by Next.js. Files added at runtime won't be available. We recommend using a third party service like AWS S3 for persistent file storage.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question