Skip to content

Images are not visible/useable after PPTX to md conversionΒ #246

Open
@adamcvolz

Description

In the PPTX Converter convert function, this 'filename' placeholder is being placed inside of the content section for the md image object:
Image

Causing us to not have the ability to support images post process:
Image

In the shape.image object, we have content_type(file type), and blob(bytes). Could easily format a base64 encoded image here instead:

img_b64_string = base64.b64encode(image_bytes).decode('utf-8')
markdown_image = f"data:{content_type};base64,{b64_string}"
md_content += ( "\n![" + (alt_text if alt_text else shape.name) + "](markdown_image)\n" )

This would allow us to process images post conversion. Not sure if it was decided b64 encoded bytes wasn't ideal, but that can easily be extracted/converted/uploaded remotely etc. to a user's needs, and could even pass a flag to make it optionally supported.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions