microsoft / microsoft/markitdown

convert docx to markdown showing the original unchopped image but not the chopped image

Open
#1,818 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
186k
Forks
13.7k
Avg merge
1d 4h
Merged PRs (30d)
49

Description

the docx looks like this in word:

Image

markitdown-bug-docx-with-chop-image.docx

but when it converted to markdown,
it output the unchopped image:

Image

codes:

md = MarkItDown()
    result = md.convert(
        BytesIO(f),
        conversion_name=file_name,
        keep_data_uris=True,
    )
markdown = result.text_content

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the attached DOCX and the Python MarkItDown.convert example, then trace the DOCX conversion path that handles images. Done means converting the supplied document to Markdown preserves the image's chopped appearance instead of outputting the unchopped image.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.