Adding a base64 encoded image to a Microsoft Word document

I want to add an image to a Word document that needs to be added as a base64 encoded image. I have jpeg. How can I add it to a Word document as base64 encoded data? I did some research and found out that this is a site that converts an image to base64 encoded data. But I do not know how I can add it to a Word document. Thank you in advance.

+4
source share
2 answers

Encode your image as base64, and then paste the base64 string into your Word document.

0
source

Since you say "Word document", I understand that this will be one of the types of documents that MS Word can open. And your question is to add a base64 encoded image to the contents of a Word document (without the add resource file). The answer is to use an OpenXML document.

The OpenXML document format allows you to add the base64 source image directly to the source code; no new external resource is created.

And in fact, when you open an OpenXML document using MSWord, then paste the image into it, the image will be saved as a base64 encoded document. You can double-check by opening the document with Notepadd ++.

0
source

All Articles