Created attachment 34468 [details] Added the output snapshot which validates the bug. Description: ============ I am using Apache POI library to extract images from a word(docx) file. The issue that I am facing is regarding extension(image type) extraction and is described as follows: * I am getting wrong extension for images(embedded via insert object from insert tab). * When the image is embedded via drag and drop then the extension is perfectly extracted Steps to reproduce : ==================== 1. Create a docx file with two images embedded to it. a. Embed first image (assume it to be 1.jpeg) via (Insert Tab -> Insert Object -> Create from file -> Add object). b. Embed second image (assume it to be 2.png) via drag and dropping in the word file. 2. Create a java program which accepts the file created and processes the file and extracts the image file and shows the "image type" and "name" in the console. Expected Result: ================= 5 => //Document.PICTURE_TYPE_JPEG = 5 image1.jpeg 6 => //Document.PICTURE_TYPE_PNG = 6 image2.png Current Result: ================ 2 => //Document.PICTURE_TYPE_EMF = 2 image1.emf 6 => //Document.PICTURE_TYPE_PNG = 6 image2.png Code used for extracting the image information: ================================================ InputStream content = null; content = new BufferedInputStream(new FileInputStream(filePath)); XWPFDocument doc = new XWPFDocument(content); List<XWPFPictureData> pics = doc.getAllPictures(); for(XWPFPictureData pic : pics) { System.out.println(pic.getPictureType()); System.out.println(pic.getFileName()); }