I have an API (with axios) returning me an PNG image in the following form:
�PNG IHDR��C�; IDATx����eu}�������{��iq6�D�� B3(2(�&1�s�/�$G~�'��=���ILrr3�x��� ��0"�� �26�XU{Z���{�������������^2�Ab�dYsn�N��r�4>m���bD$i8�ZXGR�d2�&�:�T�E�<��@eY�Z5m���p)�~�_�h2���$��d2��:�4��i����x<i�M^�� ����#�9G� @LA�� �����#�
J D+�L0,<.���B���� ���)�3b���$ ��VB�
���" ��bE0#�3A��V3��@�$�s��� ���}��&@�Y�B�E
��&��1�&��
&���3�i�}
etc etc......
I need to convert the image from the above format into a base64 string, which I will then use to display the image inside a html tag. I've tried many way but with no success. Thus here we are :)
Does someone know how this transformation can be done in nodejs or javascript?
Thank you
I expected a base64 string