D
D
dpablo_escobarr2022-01-12 15:35:21
Building projects
dpablo_escobarr, 2022-01-12 15:35:21

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

1 answer(s)
E
Everybody_Lies, 2022-01-12
@dpablo_escobarr

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.

Store images not in public, but somewhere else

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question