using next js image component
import Image from 'next/image'; export default function Home() { return ( <div> <Image src='/assets/pexels-kendall-hoopes-6000x4000.jpg' alt='universe' width={1500} height={1000} /> </div> ) }
using next js image component
import Image from 'next/image'; export default function Home() { return ( <div> <Image src='/assets/pexels-kendall-hoopes-6000x4000.jpg' alt='universe' width={1500} height={1000} /> </div> ) }
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>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us