Skip to main content
MarkItDown extracts metadata from image files and can optionally generate detailed descriptions using multimodal LLMs.

Supported Formats

  • JPEG: .jpg, .jpeg
  • PNG: .png

Dependencies

Core (No Dependencies)

Basic image conversion works without any dependencies, though metadata extraction requires exiftool.

Optional: EXIF Metadata

Security: MarkItDown requires ExifTool version 12.24 or later to avoid CVE-2021-22204. The converter will verify the version before use.

Optional: LLM Captioning

Basic Usage

Features

EXIF Metadata

Extract camera settings, dates, GPS coordinates

LLM Descriptions

Generate detailed image captions with multimodal LLMs

Embedded Metadata

Extract title, caption, description, keywords, artist

GPS Data

Extract geolocation information

Output Examples

Metadata Only

With LLM Description

EXIF Metadata Fields

The converter extracts the following EXIF fields (when available):

LLM Integration

Using OpenAI

Custom Prompts

Default prompt: "Write a detailed caption for this image."

Using Other LLM Providers

Implementation Details

Source Location

Converter Class

  • Class Name: ImageConverter
  • Accepted Extensions: .jpg, .jpeg, .png
  • MIME Types: image/jpeg, image/png

ExifTool Integration

The exiftool_metadata() function in _exiftool.py:
Security Check:

LLM Description Process

  1. Convert image to base64
  2. Create data URI: data:image/jpeg;base64,...
  3. Send to LLM with prompt
  4. Return generated description

Advanced Examples

Batch Processing Images

Extract Only Metadata

Custom Metadata Processing

Error Handling

Use Cases

Generate markdown catalogs of photo collections with metadata and AI-generated descriptions for searchability.
Extract and index metadata from image libraries for better organization and retrieval.
Generate alt text and detailed descriptions for web images using LLM captioning.
Integrate into data processing workflows to extract technical and descriptive information from images.
Extract EXIF data including GPS coordinates and timestamps for forensic or legal purposes.

Limitations

  • No OCR: Text within images is not extracted (consider using Document Intelligence for OCR)
  • LLM Accuracy: AI-generated descriptions may contain hallucinations or inaccuracies
  • Format Support: Only JPEG and PNG; no support for TIFF, GIF, WebP, etc.
  • EXIF Dependency: Metadata extraction requires external exiftool binary

Next Steps

Document Intelligence

Use Azure Document Intelligence for OCR and document analysis

PowerPoint Images

Images in PPTX files also support LLM captioning