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

255
Vistas
How to load a image with absolute path in react.js

In my react-app I want to load images with an absolute path. I get the path as a string from an api response. So its not possible to put image folder in the src oder public folder. I read several stackoverflow-question but nothing helped so far. The path I'm getting looks like this

"\\SRMS508\Dokumente\1\Artikel\Art.Nr 100085\100085_CIMG7224.JPG"

And neither this:

<img src="\\SRMS508\\Dokumente\1\Artikel\Art.Nr 100085\100085_CIMG7224.JPG"/>

not this:

<img src={require("\\SRMS508\\Dokumente\1\Artikel\Art.Nr 100085\100085_CIMG7224.JPG").default} />

is working.

And I would be very happy if anyone could help me with this.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

If you keep your images in the public folder where we keep all static assets like images then we can access them as:

Folder: public/images/

<img src="/images/logo.png" />
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