0

i have images in sqlserver as a binary, how can i display them in reactJs?

i tried the following but doesn't work

<Image source={{ uri: `data:image/jpeg;base64,${results.student_photo}` }} />

i also tried

const base64Image = {results.student_photo};
<Image source={{uri: `data:image/jpeg;base64,${base64Image}`}} />
Rob
  • 161
  • 2
  • 16
  • 1
    Possible duplicate of [How to display binary data as image in React?](https://stackoverflow.com/questions/42395034/how-to-display-binary-data-as-image-in-react) – Christopher Littlewood Nov 20 '19 at 05:04

1 Answers1

1

This may answer your question.

How to display binary data as image in React?

Hope this helps.

  • i tried that thaks i displayed it in angular easy, but react is a bit different – Rob Nov 20 '19 at 05:52