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

Image files in embedded links being destroyed #101

Open
aseem-thakar opened this issue May 10, 2022 · 5 comments
Open

Image files in embedded links being destroyed #101

aseem-thakar opened this issue May 10, 2022 · 5 comments

Comments

@aseem-thakar
Copy link

If I link to an image using embedded wiki-links (i.e. ![[Image_link]]) instead of standard Markdown (i.e. ), it results in the image file changing to 0 bytes (and unable to be viewed) albeit with the file name still intact.

I'm experiencing this with .png files - not sure if it happens with other extensions (e.g. jpg)

@ZhiyDevQAQ
Copy link

yes! I have the same question!

@zoni
Copy link
Owner

zoni commented Nov 5, 2022

I have links to various images in my own exported knowledgebase and have never seen/encountered this behavior. 🤔 I'll need a minimal reproduction case (example vault showing this issue) to investigate this further I'm afraid.

@anutator
Copy link

anutator commented May 15, 2023

Pandoc 3 has new extensions, but they convert only URL wikilinks. So you have to install an additional plugin to Obsidian (I could install manually, I didn't find it in list of plugins) and convert wikilinks to markdown before export. The similar problem, read my last comment with the link to plugin.
OliverBalfour/obsidian-pandoc#118

@Thompson-Jason
Copy link

I am having this same issue with embedded videos (WebM).

In my vault I have

![[nameOfVideo.webm]]

and it gets exported as

[nameOfVideo.webm](pathToVideo.webm)

thus not being embedded. If I go in and manually edit the output to include the "!" prefix it works as intended. I have only experience this problem with WebM files all my gifs and images are fine.

@zoni
Copy link
Owner

zoni commented Aug 17, 2024

@Thompson-Jason webm isn't registered as a filetype that's embeddable.

Some("png" | "jpg" | "jpeg" | "gif" | "webp" | "svg") => {

However, I don't think it's as simple as just adding webm there. Having an image element pointing to a video file seems a little unusual, and I'd expect most static site generators, Markdown-to-HTML renderers, etc. would act unpredictably with that.

Not sure what the right approach would be, and it would probably need to offer opt-in behavior. One of those strategies might be to rewrite it to an HTML video element.

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

5 participants