#Icon issue in the React Router Vanlife project
2 messages · Page 1 of 1 (latest)
I think Bob "from the future" added a part for that in the course.
You need to make sure you import the image and use it as the image url instead of using relative path.
eg.:
// This will cause trouble
const TroubelCausingComponent = () => {
return <img src="../super-avatar.png" alt="super avatar" />
}
import SuperAvatar from '../super-avatar.png'
const SuperComponent = () => {
return <img src={SuperAvatar} alt="super avatar" />
}