Here is the file structure of my react project
Within navbar.js
, I am encountering an issue where the brand image fails to load from the Assets/images
directory.
import '../../Assets/Css/Navbar.css';
import image from '../../Assets/Images/andarjani.png'
import Container from 'react-bootstrap/Container';
import Navbar from 'react-bootstrap/Navbar';
import Nav from 'react-bootstrap/Nav'
import Row from 'react-bootstrap/Row'
import Col from 'react-bootstrap/Col'
import {RiHome4Line} from "react-icons/ri";
export default function Header() {
return (
<Navbar bg='dark'>
<Container>
<Navbar.Brand >
<img src="../../Assets/Images/andarjani.png" alt='logo' />
</Navbar.Brand>
<Nav>
<Nav.Item>
<RiHome4Line/>
</Nav.Item>
</Nav>
</Container>
</Navbar>
)
}
I am struggling with this relative path issue that prevents the image from loading.
What would be the correct path to resolve this problem?