I've started a new project (my future portfolio) by using nextJs and i have some problems to bring some images to a section. I think that it is a path problem but i can't resolve it despite my search on the Nextjs Doc...
this is where i want to bring my image
this is how i organize my files
if someone has an idea it would be great !
Have a nice day
CodePudding user response:
To use a local image, import your .jpg, .png, or .webp files:
import Image from 'next/image'
import examplePicture from './example/picture.jpg'
and then use imported picture as an image src
<Image
src={examplePicture}
/>
CodePudding user response:
You need to put your images inside a public folder and then everything should work.
For example <Image src="./img.png" />
will load if the image exists under public/img.png
.