title: jpeg/ png Image Insertion Error- python-docx
body: <p>I am trying to copy images from one word document to the other.
  For that, I extracted all the images from the word document into a folder(img_folder) using the following code:</p>
  <pre><code>docx2txt.process('Sample2.docx', 'img_folder/')
  </code></pre>
  <p>Using the above code the images get saved into the img_folder in jpeg/png format
  However, when I try to insert the images from this folder I get the following error:</p>
  <pre><code>File &quot;D:/Pycharm Projects/pydocx/newaddImg.py&quot;, line 60, in copy
      newp.add_run().add_picture(imgPath)
    File &quot;D:\Pycharm Projects\pydocx\env\lib\site-packages\docx\text\run.py&quot;, line 62, in add_picture
      inline = self.part.new_pic_inline(image_path_or_stream, width, height)
    File &quot;D:\Pycharm Projects\pydocx\env\lib\site-packages\docx\parts\story.py&quot;, line 56, in new_pic_inline
      rId, image = self.get_or_add_image(image_descriptor)
    File &quot;D:\Pycharm Projects\pydocx\env\lib\site-packages\docx\parts\story.py&quot;, line 29, in get_or_add_image
      image_part = self._package.get_or_add_image_part(image_descriptor)
    File &quot;D:\Pycharm Projects\pydocx\env\lib\site-packages\docx\package.py&quot;, line 31, in get_or_add_image_part
      return self.image_parts.get_or_add_image_part(image_descriptor)
    File &quot;D:\Pycharm Projects\pydocx\env\lib\site-packages\docx\package.py&quot;, line 74, in get_or_add_image_part
      image = Image.from_file(image_descriptor)
    File &quot;D:\Pycharm Projects\pydocx\env\lib\site-packages\docx\image\image.py&quot;, line 55, in from_file
      return cls._from_stream(stream, blob, filename)
    File &quot;D:\Pycharm Projects\pydocx\env\lib\site-packages\docx\image\image.py&quot;, line 176, in _from_stream
      image_header = _ImageHeaderFactory(stream)
    File &quot;D:\Pycharm Projects\pydocx\env\lib\site-packages\docx\image\image.py&quot;, line 199, in _ImageHeaderFactory
      raise UnrecognizedImageError
  docx.image.exceptions.UnrecognizedImageError
  </code></pre>
  <p>Can anyone suggest how to resolve this error.</p>