Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

262
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda