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

Handle relative image paths #346

Open
davestewart opened this issue Sep 23, 2022 · 2 comments
Open

Handle relative image paths #346

davestewart opened this issue Sep 23, 2022 · 2 comments

Comments

@davestewart
Copy link

davestewart commented Sep 23, 2022

Hi there,

It would be really useful to have relative image paths automatically resolved:

![image](./image.png)

I see the lib uses MarkdownIt; perhaps a plugin exists, or could be written?

I'm happy to take input, research and potentially PR this.

@theoephraim
Copy link

In the meantime, adding something to the docs on the recommended way to handle images would be great.

I think for now probably the best option is to put images in the public folder and refer to them with an absolute URL (but removing /public/. This is obviously not ideal though...

@raphaelmenges
Copy link

I am using the plugin within an Electron environment and thus have different absolute image path during development and after deploy. I would be fine with replacing image src on-the-fly before or after loading the markdown as Vue component. I was experimenting with the markdown option of the plugin, yet, it seems to replace the entire markdown rendering process? Anyway, handling relative image path properly would be a huge plus!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants