Reproduced by us
ImageConverter threw RuntimeError with message: ExifTool version 12.16 is vulnerable to CVE-2021-22204. Please upgrade to version 12.24 or later.
MarkItDown refuses to run an ExifTool older than 12.24.
Formats
By default MarkItDown keeps a placeholder for each picture, not the picture. What you can get instead depends on which of three things you need: the image data, the images as files, or a description in words.
Short answer
--keep-data-uris option.markitdown report.docx --keep-data-uris -o report.mdTested with markitdown 0.1.9 · Python 3.13 · markitdown[all] 0.1.9 · ExifTool 12.76 · Linux lab; descriptions by two local vision models on a CPU-only runner (T10) · 2026-11-15 · evidence: office-features.csv, llm-providers.csv, images-features.jsonl, img-I10-exiftool.md
| Source | Result | What came out | Note |
|---|---|---|---|
| DOCX picture without alt text | changed | Before↵↵↵↵After | Placeholder with the data cut off after base64. With keep_data_uris: 44 to 11246 characters. |
| DOCX picture with alt text | changed |  | Alt text kept; data cut off. With keep_data_uris: 61 to 11263 characters. |
| PPTX pictures | changed | <!-- Slide number: 1 -->↵# Pictures↵↵↵↵ | An image reference to a file name that is never written; the alt text or the original file name is the label. With keep_data_uris: 114 to 22542 characters. |
| XLSX picture | lost | ## Sheet↵| Quarter | Revenue |↵| --- | --- |↵| Q1 | 10 |↵| Q2 | 14 |↵| Q3 | 9 | | Pictures in workbooks are not output at all. |
| PDF picture | lost | Text above a picture↵↵Text below the picture↵↵ | Pictures in PDFs are not output. |
| HTML inline data-URI image | changed | # Page↵↵Text↵↵ | The inline image is truncated like Office images; the remote image keeps its URL and is not fetched. With keep_data_uris: 91 to 11293 characters. |
| EPUB image | changed | **Title:** Image book↵**Language:** en↵**Identifier:** x↵↵# Chapter↵↵Text before.↵↵ | See the excerpt for how the image reference looks. |
| PNG file on its own | changed | ImageSize: 640x360↵ | With ExifTool installed: the size only. Without ExifTool the output is empty (row I10). |
| JPEG file on its own | changed | ImageSize: 640x360↵Artist: MarkItDown pilot↵ | With ExifTool installed: the metadata fields it finds, no description of the picture. |
| JPEG without and with ExifTool | changed | without: (empty) | with: ImageSize: 640x360↵Artist: MarkItDown pilot↵ | ExifTool 12.76; without ExifTool the output is empty. |
| GIF file | lost | UnsupportedFormatException: Could not convert stream to Markdown. No converter attempted a conversion, suggesting that the filetype is simply not supported. | No converter. |
| BMP file | lost | UnsupportedFormatException: Could not convert stream to Markdown. No converter attempted a conversion, suggesting that the filetype is simply not supported. | No converter. |
| TIFF file | lost | UnsupportedFormatException: Could not convert stream to Markdown. No converter attempted a conversion, suggesting that the filetype is simply not supported. | No converter. |
| WEBP file | lost | UnsupportedFormatException: Could not convert stream to Markdown. No converter attempted a conversion, suggesting that the filetype is simply not supported. | No converter. |
| SVG file | changed | <svg xmlns="http://www.w3.org/2000/svg" width="40" height="20"><rect width="40" height="20" fill="red"/></svg> | Echoed as XML source. |
In short: Word, HTML and EPUB give an image reference, with the data cut off for Word and HTML; PowerPoint gives a reference to a file that is never written; Excel and PDF give nothing.
data:image/png;base64...The ellipsis is deliberate truncation: the picture was in the file and was cut to save tokens. A Word file with one picture came out as 44 characters by default and 11,246 characters with the data kept:
Before↵↵↵↵AfterBefore↵↵[image]↵↵After
The command-line flag and the Python keyword are the same option; the output of a Word file then starts like this (the flag is shown above):
$ markitdown docx-images-no-alt.docx --keep-data-uris
[exit 0] 1.10s stdin=none
--- stdout (34508 bytes, first 2000)
# Images
.
Convert with the data kept, decode each image, write it into an images folder and rewrite the link. This ran on a Word file, a PowerPoint file and an HTML page; it does nothing for EPUB, which already gives a file name, and we did not run it on the whole corpus:
import base64, re
from pathlib import Path
from markitdown import MarkItDown
def extract_images(source: str, out_dir: str = "images") -> str:
"""Convert with the image data kept, write every data: image to out_dir and point the Markdown at the files."""
markdown = MarkItDown().convert(source, keep_data_uris=True).markdown
Path(out_dir).mkdir(exist_ok=True)
stem = Path(source).stem
count = 0
def save(match):
nonlocal count
count += 1
ext = {"jpeg": "jpg", "svg+xml": "svg"}.get(match.group("kind"), match.group("kind"))
name = f"{out_dir}/{stem}-{count}.{ext}"
Path(name).write_bytes(base64.b64decode(match.group("data")))
return f""
return re.sub(r"!\[(?P<alt>[^\]]*)\]\(data:image/(?P<kind>[a-z0-9.+-]+);base64,(?P<data>[A-Za-z0-9+/=]+)\)", save, markdown)
for source in ("samples/docx-image-alt.docx", "samples/pptx-pictures.pptx", "samples/img-inline.html"):
result = extract_images(source)
print(source, "->", [line for line in result.splitlines() if "images/" in line])
print(sorted(p.name for p in Path("images").iterdir()))samples/docx-image-alt.docx -> ['']
samples/pptx-pictures.pptx -> ['', '']
samples/img-inline.html -> ['']
['docx-image-alt-1.png', 'img-inline-1.png', 'pptx-pictures-1.png', 'pptx-pictures-2.png'] Office files are ZIP archives and the pictures are in a media folder. This extracts them with standard tools, but there is no link from the Markdown to the image:
import zipfile
# Word, PowerPoint and Excel files are ZIP archives; the pictures are in a media folder
for name in ("samples/docx-image-alt.docx", "samples/pptx-pictures.pptx"):
with zipfile.ZipFile(name) as z:
print(name, [n for n in z.namelist() if "/media/" in n])samples/docx-image-alt.docx ['word/media/image1.png']
samples/pptx-pictures.pptx ['ppt/media/image1.png'] Since release 0.1.8 the DOCX, PPTX and XLSX converters expose an image hook that plugins can override; the OCR plugin uses it. We did not test a plugin that writes image files.
MarkItDown does not extract them, and we did not test an external route.
It applies to JPEG and PNG files and to pictures in PowerPoint. The default prompt asks for a detailed description and you can pass your own. For an image file the description comes under a # Description: heading; in PowerPoint it is merged with the alt text inside the image reference (PowerPoint page). If the call fails the conversion raises an error (release 0.1.8 and later).
We ran two small vision models served by Ollama on a four-core CPU-only machine. No key, no hosted service:
# Description:
"Quarterly revenue (sample chart) shows a significant increase in Q4 compared to the other quarters, indicating a strong performance in the fourth quarter."Description:
"Quarterly revenue (sample chart) shows a significant increase in Q4 compared to the other quarters, indicating a strong performance in the fourth quarter."
# Description:
The image features a bar graph that displays the quarterly revenue of a company. The graph is divided into four bars, each representing a quarter of the year. The bars are colored in red, with the first bar being the tallest and the last one being the shortest. The graph is set against a white background, making the colors of the bars stand out. The text "Quarterly revenue (sample chart)" is written above the graph, indicating that the graph is a sample chart representing the company's quarterly revenue.Description:
The image features a bar graph that displays the quarterly revenue of a company. The graph is divided into four bars, each representing a quarter of the year. The bars are colored in red, with the first bar being the tallest and the last one being the shortest. The graph is set against a white background, making the colors of the bars stand out. The text "Quarterly revenue (sample chart)" is written above the graph, indicating that the graph is a sample chart representing the company's quarterly revenue.
| Model | Prompt | Seconds | Description starts |
|---|---|---|---|
moondream | default prompt | 8.9 | # Description: The image features a bar graph that displays the quarterly revenue of a company. The graph is divided into four bars, each representing a quarter of the year. The bars are colored in red, with the first ba |
moondream | custom prompt | 8.1 | # Description: The image features a bar graph that displays the quarterly revenue of a company. The graph is divided into four bars, each representing a quarter of the year. The bars are colored in red, with the first ba |
moondream | Spanish prompt | 8.8 | # Description: The image features a bar graph that displays the quarterly revenue of a company. The graph is divided into four bars, each representing a quarter of the year. The height of each bar indicates the revenue g |
qwen2.5vl:3b | default prompt | 31.9 | # Description: "Quarterly revenue (sample chart) shows a significant increase in Q4 compared to the other quarters, indicating a strong performance in the fourth quarter." |
qwen2.5vl:3b | custom prompt | 28.7 | # Description: The image is a bar chart titled "Quarterly revenue (sample chart)" with four bars representing Q1, Q2, Q3, and Q4. |
qwen2.5vl:3b | Spanish prompt | 29.0 | # Description: Esta imagen muestra un gráfico de barras que representa los ingresos trimestrales (Q1, Q2, Q3, Q4) de una empresa, con Q4 mostrando el mayor ingreso. |
no-such-model | wrong model name | 0.0 | |
moondream | nothing listening | 0.0 | |
moondream | timeout of 1 ms | 0.0 |
Setup, providers and cost: the LLM page. Hosted models are not tested by us.
Field: value lines of the metadata ExifTool finds:ImageSize: 640x360
Artist: MarkItDown pilot
ImageSize: 640x360 Artist: MarkItDown pilot
Reproduced by us
MarkItDown refuses to run an ExifTool older than 12.24.
Affected: 0.1.3 and later with ExifTool older than 12.24 · last reproduced 2026-11-15 · Upstream report
EXIFTOOL_PATH (a wrong path gave Failed to invoke exiftool at …; environment variables):winget install --id OliverBetz.ExifTool --exactbrew install exiftoolsudo apt-get install -y libimage-exiftool-perlUnsupportedFormatException; convert them to PNG first (Pillow does it in one line). SVG is echoed as its XML source. We did not test HEIC. We did not test a file with GPS data, but ExifTool's output is printed as it comes, so check your files before sharing the Markdown.| Goal | Route | Effect on output |
|---|---|---|
| Archive a document with its pictures | Keep data URIs, or extract the files with the script | Output grows, from 44 to 11,246 characters for one small picture |
| Feed a language model text only | The default | Placeholders only |
| Feed a multimodal model | Extract the files, send them separately | Text plus images |
| Make charts searchable | An LLM description, or PowerPoint charts (they become data tables) | Text, at 9 to 90 seconds per image on a CPU |
| Scanned pages | OCR | Text from the image |