microsoft / microsoft/markitdown
Images in Docx file
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 186k
- Forks
- 13.7k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 49
Description
Hello Team,
We are using MarkItDown and so far it is working very well.
We came across an issue with docx files having images, looking into the code, it looks like mammoth library which is used by DocxConverter allows passing a handler which can process the images and return let's say alt text. These when converted to markdown are giving descriptions for the images.
But I could not see an option of passing this handler in the convert call on MarkItDown class.
Could this be exposed if possible ?
an example in mammoth will be like this
htmlResult = mammoth.convert_to_html(
"<path to docx file>",
convert_image=mammoth.images.img_element(convert_image),
)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the MarkItDown convert call into DocxConverter and review how the Mammoth conversion is invoked. Use Mammoth's convert_image handler example as the reference, then verify that exposing the option allows DOCX images to produce descriptions in the resulting Markdown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100