logo

NextImage

Used to use images in a NextJS project.

react-components

Important:

You must config your next.config.js file before to use NextImage component.

Props:

imgUrl

Description: The image address. Type: String. Required.

width

Description: Define the image width. Type: Number. Required.

height

Description: Define the image height. Type: Number. Required.

style

Description: Image style. Type: CSSProperties.

className

Description: Image className. Type: String.

Code <NextImage imgUrl='https://images.unsplash.com/photo-1654659332294-3dd5664e0253?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=687&q=80' width={400} height={320} />

PabloSilvaDev - © Copyright 2022