2

I am consuming a private API of personal data, (/ user) and to consult a photo of the user I have to pass the user id to a new API (/ media /: user_id).

What do I get from this api, I think it's binary, how can I show the image? In php I use base64_encode in react I don't know how to do it.

I already searched and found nothing that would help me ..

 Response from MEDIA api

Adam Azad
  • 11,171
  • 5
  • 29
  • 70
  • Does this answer your question? [How to display binary data as image - extjs 4](https://stackoverflow.com/questions/14915058/how-to-display-binary-data-as-image-extjs-4) – Lain Aug 07 '20 at 09:51
  • This is not solve my problem. :/ – Filipe Correia Aug 07 '20 at 10:42
  • For what I understand it seems you need to decode the image you get in order to show it. Have you tried this https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/decode? – jamomani Aug 07 '20 at 11:30
  • @jamomani with videos i have the same problem, look: https://ibb.co/LNgT46B – Filipe Correia Aug 07 '20 at 12:02

0 Answers0