Skip to content

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

Closed

Description

@adamcvolz

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.

Activity

  1. afourney commented on Mar 21, 2025

    @afourney
    Member

    Fixed in #1140

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

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