DEV Community

Muhammad Bilal Mohib-ul-Nabi
Muhammad Bilal Mohib-ul-Nabi

Posted on

Rendering Local/Static Images in Next JS

To render a static image in Next JS.

  1. Always store images in the folder called public under the src directory.
  2. To render an image if image name was img.png.Then it will be available like this.
<img src={`img.png`} alt="Person Avatar" />
Enter fullscreen mode Exit fullscreen mode

Thats it.
For more info
Original Source

Top comments (0)