How do you insert images into an XML file?

Asked

Viewed 2,070 times

-1

Hello, I have an xml file, and I would like to know how to introduce an image inside it, someone could help?

1 answer

0


XML is practically a text-based format, which means you won’t be able to "see the image" in your XML document.

You can turn the image into Base64 and embed the string in XML.

UPDATE

First, you turn the image into Base64 here: https://www.base64-image.de/

Afterward just paste inside the img div <img>data:image/png;base64,....</img> the code of the site above.

  • I’m not good with xml, I couldn’t simplify what I said?

  • What language do you use? You only need an image or it will be a function?

  • image only, is for a mobile project

  • N forgets to evaluate :) good luck, abs

Browser other questions tagged

You are not signed in. Login or sign up in order to post.