Skip to content

Images in Docx file #317

@abhilash-kozhikkot

Description

@abhilash-kozhikkot

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),
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions