next js get path of static image code example
Example: how to add img in next.js
yarn add next-images
// add in next.config.js
const withImages = require('next-images')
module.exports = withImages()
//where the image should go
<img src={require('./my-image.jpg')} />
//or
import img from './my-image.jpg';
export default () => <div>
<img src={img} />
</div>