DEV Community

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

Posted on

2 1

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)

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more