I Have a .jpg file encoded ANSI, I tried converting it to UTF-8 but it made the image corrupt.
NOTE: if you have a solution for any other image format, please post them.
I can suggest you base64 encoding, which will enconde files in text for you. Though I am not familiar with the algorithm itself, I can present several websites that do it for you:
Adidtionaly, you can also use such images in your own website by adding them to the HTML. The following answer has some good information regarding this method:
It can be done in NotePad++ easily:
Now file shows in Base64 characters instead of binary
Reference: https://www.technipages.com/how-to-base64-encode-and-decode-in-notepad