extract_images

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Parser MCP server lets your agent work with files on your machine; they are never uploaded. It runs in Docker: replace /path/to/documents with the folder it may use.

claude mcp add groupdocs-parser -- docker run --rm -i -v /path/to/documents:/data ghcr.io/groupdocs-parser/parser-net-mcp:latest
Folders, licensing and more →

extract_images saves every embedded image in a document to your storage folder as separate files, named <basename>_image<N>.<ext>. Restrict to one page with page. Example prompt: “Pull the images out of this deck.”

Tool description (as the AI agent sees it):

Extracts all images from a document and saves them to storage as separate image files. Supports PDF, DOCX, XLSX, PPTX, HTML, EPUB, and 30+ more formats with embedded images. Call this tool immediately whenever the user asks to extract images, get images, or save images from a document. Do NOT pre-check whether files exist — just pass the filename the user provided. Returns a list of saved-path messages, one per extracted image (named ‘_image.’). On failure, the response text starts with ‘Image extraction failed for’ followed by the underlying exception type, message, and inner-exception chain.

Parameters

NameTypeRequiredDescription
fileobjectyesThe document — see FileInput shape
passwordstringnoPassword for protected documents
pageintegernoPage number to extract images from (1-based). Omit for all pages.

Example call

{
  "name": "extract_images",
  "arguments": {
    "file": {
      "filePath": "deck.pptx"
    },
    "page": 3
  }
}

Result

A list of saved-path messages, one per extracted image.

The images are written to disk rather than returned inline, which keeps the response small and makes the results usable by everything else on your machine. A document with many images produces many files — restrict by page when you only need one.

On failure the text starts with Image extraction failed for, followed by the exception type and message.

Example prompts

  • “Pull the images out of this presentation.”
  • “Extract the figures from page 3 of the report.”
  • “Save every embedded picture from these documents.”