Skip to content

Instantly share code, notes, and snippets.

Insert picture in DOCX with Python-dotx library
from docx import Document
document = Document()
document.add_picture('file-name-of-image.png')
document.save('docx with image from file.docx')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment