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

107
Vistas
Cannot show an image from django backend

I am sending my photo from django as part of my JWT access_token payload with the intention to retrieve render and even update that image in my React app. Right now I'm focused on getting the image to show my custom user model. This is what my payload looks like when I decode it:

{
  "token_type": "access",
  "exp": ***,
  "iat": ***,
  "jti": "***",
  "user_id": 1,
  "username": "test",
  "first_name": "",
  "last_name": "",
  "country": "",
  "city": "",
  "bio": "",
  "photo": "\"profile/2022/03/27/testuserpic.png\""
}

I have tried to access the image using this code

let { user,logOutUser } = useContext(AuthContext)
            <img
              alt="..."
              className="avatar border-gray"
              src={`http://127.0.0.1:8000/media/${user.photo}`}
            />

but getting the error:

Failed to load resource: the server responded with a status of 500 (Internal Server Error)
about 4 years ago · Juan Pablo Isaza
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