Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

253
Views
img not displaying (img src file path wrong?)

this is my header.js

<div className="navbar">
      <header>
        <div>
          <img src="../Images/coatHanger.svg" alt="coatHanger" />
          <h1>E-commerce</h1>
        </div>
        <div>
          <ul className="nav-items">
            <li>Products</li>
            <li>Home</li>
            <li>About</li>
          </ul>
        </div>
      </header>
    </div>

this is my file structure

src
|Components
||Header.js
|Images
||coatHanger.svg
|App.js
|Index.js

this is the css for the img

img[alt="coatHanger"] {
  width: 100px;
  height: 100px;
}

I have tried "./Images/coatHanger.svg" and "/Images/coatHanger.svg" but those don't work either.

Edit:Thanks now it works. Using import

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!