my image are in the public directory I still don’t know why isn’t displaying on both my local host and GitHub pages
I have tried checking the path and still getting the same issue, I even tried moving the images into my main folder directory but still it didn’t work.
2
Answers
First of all if you use images inside components or pages, you should move them into src folder and for best practice, you should store them in assets folder inside src.
but if you just only want to use them inside public folder, for instance in index.html file, you should write href(src) like %PUBLIC_URL%/your_img.png
You have import the images into your component like this: