display image in react as png/jpg went wrong

18 views Asked by At

I'm fetching a member's personal data from a react table and I want to display the field's data_image that stores blob as a png/jpg image, but I get this symbol instead
enter image description here

This is the code I've tried.

      <td>{member.image_data && <img src={`data:image/jpeg;base64,${member.image_data.toString('base64')}`} />}</td>

can you solve the problem?

0

There are 0 answers