xml_image {moodef} | R Documentation |
Generate HTML and XML Representations for an Image
Description
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.
Usage
xml_image(image, image_alt, adapt_images = FALSE, width = NULL, height = NULL)
Arguments
image |
|
image_alt |
|
adapt_images |
|
width |
|
height |
|
Details
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.
Value
A list with two elements:
img
character
: HTML string containing the<img>
tag.fimg
character
: XML string containing the base64-encoded<file>
tag.