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

261
Views
images is not rendered in the browser(Reactjs)

I am trying to load a local image in my Nav component and in the landing page.

So this is what I've done so far:

const LandingScreen = ()=>{

    return(
        <div>
           <img src ={'../Images/auction.jpg' } style={{width:100, height:100}} />
        </div>
    )

};

export default LandingScreen;

and this is my App component:

import './App.css';
import Header from './Components/Header/Header';
import Footer from './Components/Footer/Footer';
import './bootstrap.css';
import Register from './Screens/RegisterScreen/Register';
import Login from './Screens/LoginScreen/Login';
import {Route, BrowserRouter as Router, Routes} from 'react-router-dom';
import LandingScreen from './Screens/LandingScreen';

const App = ()=> {
  return (
    <Router>
      <Header/>
      <Routes className ="front">
        <Route path="/" element={<LandingScreen/>} exact/>
        <Route path ="/register" element ={<Register/>}/>
        <Route path ="/login" element ={<Login/>}/>
      </Routes>
      <Footer/>
    </Router>
     
  );
}

export default App;

And this is the result that I am getting in the browser: How the image appear in the browser

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

according to CRA documentation you should import you image first, then use it in your img tag

https://create-react-app.dev/docs/adding-images-fonts-and-files/

about 4 years ago · Juan Pablo Isaza Report
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!