Skip to content

Instantly share code, notes, and snippets.

@groupdocs-cloud-gists
Last active July 4, 2025 06:18
Show Gist options
  • Save groupdocs-cloud-gists/06124cc5f3b65a9e330de77901c33774 to your computer and use it in GitHub Desktop.
Save groupdocs-cloud-gists/06124cc5f3b65a9e330de77901c33774 to your computer and use it in GitHub Desktop.
Get Word document images

Develop Word Document Image Extractor


This article demonstrates how to extract images from Word (.doc, .docx) documents using Node.js and GroupDocs.Parser Cloud REST API. Follow step-by-step instructions using GroupDocs.Parser Cloud SDK for Node.js API and cURL commands to automate the image extraction process.



For more details, please visit Develop Word Document Image Extractor using Node.js.

extract images from word document

Important Links

Product Page | Docs | Live Demo | API Reference | Code Samples | Source Code | New Releases | Blog | Free Support | Free Trial

REST API to get images from MS Word document
// For more examples, please visit https://github.com/groupdocs-parser-cloud/groupdocs-parser-cloud-node
const { Configuration, ParserApi, TextOptions, TextRequest, FileInfo } = require("groupdocs-parser-cloud");
const config = new Configuration("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET");
const parserApi = new ParserApi(config);
const fileInfo = new FileInfo();
// path of word document
fileInfo.filePath = "sample.docx";
const options = new TextOptions();
options.fileInfo = fileInfo;
const request = new TextRequest(options);
parserApi.images(request).then((response) => {
console.log("The Word document Images extracted successfully.");
console.log(response.images);
}).catch(err => {
console.error("Failed to extract images:", err);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment