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

106
Views
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
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!