Ask Your Question
4

Why are the public images not appearing on dynamic routes in NEXTJS?

asked 2021-05-15 11:00:00 +0000

scrum gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-01-03 10:00:00 +0000

plato gravatar image

There could be various reasons why public images are not appearing on dynamic routes in NEXTJS. Here are some possible reasons:

  1. Incorrect file path: If the file path for the image is incorrect, the image won't load. Make sure the file path in the source attribute of the image tag is correct.

  2. No image extension: If the file extension of the image is missing, the browser may not be able to display the image. Make sure the image file has a valid extension (such as .png, .jpg, or .gif).

  3. Image not in the public folder: Make sure the image is in the public folder of your project. Images placed outside the public folder may not be accessible.

  4. Incorrect image URL: If the URL for the image is incorrect, it won't load. Make sure the URL is correct and includes the file extension.

  5. Caching issue: Sometimes, the browser may cache the previous version of the image, which can prevent the new version from loading. Try clearing the browser cache and reloading the page.

  6. Server rendering issue: If you are using server rendering, make sure the images are being rendered correctly on the server side.

By checking and correcting these possible issues, the images should appear on the dynamic routes in NEXTJS.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-05-15 11:00:00 +0000

Seen: 15 times

Last updated: Jan 03 '22