Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local image to data URI? #16

Open
fengwang opened this issue Jan 23, 2019 · 1 comment
Open

Local image to data URI? #16

fengwang opened this issue Jan 23, 2019 · 1 comment
Labels
feature Feature Request

Comments

@fengwang
Copy link

Minimal Code Example

![]( ./images/a.png)

to html5

<img  src="data:image/png;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOy...">

Conditions

If in absolute path or relative path, there exists such an image, generate its data URI instead of providing a link.

Description

convert image to base64 seems a bit annoying, is it possible to implement this feature?

@progsource
Copy link
Owner

Adding the functionality to maddy directly would make it necessary to add file handling and image-to-bas64 processing. I actually like libraries which do one thing and one thing only, so I don't feel like this should go directly into maddy. At the moment I am considering making some kind of plugin functionality, so that you could hook into the parsing and replace the image filename yourself.

At the moment the only thing you can do is either replacing it before or after maddy is parsing your markdown files.

@progsource progsource added the feature Feature Request label Feb 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature Request
Projects
None yet
Development

No branches or pull requests

2 participants