Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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.