Answers for "where to put files next js"

0

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>
Posted by: Guest on June-25-2020

Code answers related to "where to put files next js"

Browse Popular Code Answers by Language