0

I am trying to save Base64 image data as a PNG file on the server. I'm currently rendering the raw data like so...

<img src="data:image/jpeg;base64,{binary data}" />

This works for displaying the image, however I'm finding it impossible to share the image to social media sites using social media share buttons like 'react-share': https://github.com/nygardk/react-share

Is this due to the image not being in a file format such as .jpg or .png? If so, how may I save Base64 data to a standard image file?

mobiman
  • 619
  • 1
  • 11
  • 26
  • the duplicate thread is with php, but we don´t know your server language, so i can only assume. if it´s node.js/javascript: https://stackoverflow.com/questions/6926016/nodejs-saving-a-base64-encoded-image-to-disk – andyrandy Aug 08 '18 at 20:54
  • Yes, it's Express/Node.js. Thanks for the link. – mobiman Aug 09 '18 at 04:54

0 Answers0