Embed Base64 Images in Markdown Content
mistral_embed_images.RdThis function processes markdown content and replaces image references with embedded base64 data URIs from a Mistral OCR response object. This allows images to be displayed inline in HTML without external files.
Details
The function looks for image references in the markdown and replaces them with HTML img tags containing base64-encoded image data. This is useful for rendering OCR results in Shiny applications or R Markdown documents.
Supported image reference patterns:
,, etc. (Mistral's default format)![image1],![image2], etc.![1],![2], etc.Generic
patterns