| xml_image | R Documentation |
This function generates an HTML <img> tag and an XML <file> tag for a given image.
The image can be processed to adjust its dimensions and encoded in base64 for embedding.
xml_image(image, image_alt, adapt_images = FALSE, width = NULL, height = NULL)
image |
|
image_alt |
|
adapt_images |
|
width |
|
height |
|
If adapt_images = TRUE, the function resizes the image using the specified dimensions.
If adapt_images = FALSE, the function reads the image's original dimensions and uses them.
The image is embedded as a base64 string in the <file> tag for compatibility with XML-based systems.
A list with two elements:
imgcharacter: HTML string containing the <img> tag.
fimgcharacter: XML string containing the base64-encoded <file> tag.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.