0

My binary image is in DB on an address: http://localhost:8000/pictures/f31289ae-0491/data

I'm using React and I would like to display image on the page

I know there is a lot of similar questions, but I couldn't find solution to my problem.

png Image example

peronja
  • 349
  • 3
  • 5
  • 11
  • 1
    try this: [binary data to image](https://stackoverflow.com/questions/41972435/how-to-convert-the-binary-data-to-image-in-reactjs) – Mayank Shukla Mar 26 '18 at 08:47
  • I tried that but still without success, and with error invalid url – peronja Mar 27 '18 at 07:29
  • can you create a fiddle and put the binary data in a variable use the same the way suggested in the another answer, because it should work. – Mayank Shukla Mar 27 '18 at 07:37
  • That would be something like this: https://jsfiddle.net/perija/bhd1kom3/7/ This.state.image I'm getting from db – peronja Mar 28 '18 at 07:26
  • 1
    i think, that data is not base64, check this ques for same data: https://stackoverflow.com/questions/29343196/how-to-convert-base64-to-image-by-using-jquery – Mayank Shukla Mar 28 '18 at 07:53

0 Answers0