rsnext/errors/no-img-element.md
Konstantin Popov 93bac0f2b7
Fix minor typo in no-img-element.md (#29027)
Fix minor typo: 

image optimization -> Image Optimization
2021-09-12 00:39:43 +00:00

647 B

No Img Element

Why This Error Occurred

An HTML <img> element was used to display an image. For better performance and automatic Image Optimization, use Next.js' built-in image component instead.

Possible Ways to Fix It

Import and use the <Image /> component:

import Image from 'next/image'

function Home() {
  return (
    <>
      <Image
        src="https://example.com/test"
        alt="Landscape picture"
        width={500}
        height={500}
      />
    </>
  )
}

export default Home