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

Not displaying images with relative paths #38

Open
coro101 opened this issue Mar 6, 2023 · 1 comment
Open

Not displaying images with relative paths #38

coro101 opened this issue Mar 6, 2023 · 1 comment
Assignees

Comments

@coro101
Copy link

coro101 commented Mar 6, 2023

The plugin does not seem to support relative paths in markdown links.
I checked out Embed images and #9.

May I ask if the sentence indicates that relative paths within subdirectories are not supported?

Description

This is an example directory tree:

Marp/
├── markdown-file.md
└── static/
    └── images/
        └── background.png

For example, when using the following markdown syntax: ![bg](static/images/background.png), the image does not display correctly in Marp/markdown-file.md.
In my opinion, *Marp*/static/images/background.png is an absolute path.

Expected behavior:

When using relative paths in markdown links, the image should be displayed correctly.

Steps to reproduce:

  1. Create a markdown file in the Marp directory.
  2. Create an "images" directory in the "static" directory under the "Marp" directory.
  3. Add an image to the "images" directory.
  4. Insert the following markdown syntax in the markdown file: ![bg](static/images/background.png).
  5. Preview the file in Marp or in Obsidian.

Actual behavior:

The image does not display correctly and instead shows the alt text of the markdown link.

@JichouP
Copy link
Owner

JichouP commented Mar 6, 2023

I see!
In fact, I hadn't assumed relative paths from markdown files.
Thanks for bringing this to my attention!

I think I can probably solve this problem, so please give me some time.

@JichouP JichouP self-assigned this Mar 6, 2023
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

2 participants