foam
foam copied to clipboard
Foam doesn't support the title attribute in images links
Describe the bug
I have the same issue, like https://github.com/foambubble/foam/issues/1200, with different cause. foam v0.24.0
 show as a placeholder
 no such image, show as a placeholder
 no such image, show as a placeholder
 show as a placeholder
 ok
 ok
I guess we cannot use absolute style path for images.
My pasteImage settings:
"pasteImage.path": "${projectRoot}/attachments/2023",
"pasteImage.insertPattern": "${imageSyntaxPrefix}/${imageFilePath}${imageSyntaxSuffix}",
"pasteImage.basePath": "${projectRoot}",
And it looks like treating non-markdown files as placeholders:
[](../../archive/cards/cant-allocate-memory.md) ok
[](../.emacs) file exists; show as a placeholder
[](../../.vscode/extensions.json) file exists; show as a placeholder
Small Reproducible Example
No response
Steps to Reproduce the Bug or Issue
search show as a placeholder
in issue's description.
Expected behavior
- if links an existed image/file, the "PLACEHOLDERS" session will not show them
- support abs path relative to project root?
Screenshots or Videos
Operating System Version
Windows 10
Visual Studio Code Version
1.74 and 1.80
Additional context
No response
There are two issues here IMO:
- attachments needs to be explicitly added to Foam via the setting. At this point I believe this was the wrong call, and that attachments should all be included by default, giving people the option of excluding them as needed (e.g. via the
foam.files.ignore
setting) - we don't support absolute links from the repo root. the convention we have so far is:
- if the path starts with
/
it's considered to be absolute (at the system level, e.g./Users/riccardo/hello.md
) - if the path starts with
./
or../
it's considered to be relative to the current file/context - if the path starts with anything else it's considered to be relative to the workspace root (e.g.
journal/today.md
)
Let's keep this task for n.2 and absolute/relatives paths. Feel free to create a new issue for n.1
Hi,
I have the same issue and I didn't understand your answer.
Thank you in advance for your reply :)
BoudSTER
Sorry, not sure I understand your question from the screenshot you provided, can you clarify?
As context, I should also mention that wikilinks embeds for images work, e.g. ![[my-image.png]]
It seems that foam did not consider the possibility of the Title attribute appearing.
Yup, good point, that's exactly the issue
Is there any progress on this issue?
In addition, I also found that Foam treats the node's parent directory as a node that has not been created after executing Foam: show graph
.
It seems that Foam treats existed asset as node as well, even if the asset isn't linked in any markdown file (such as "nanoGPT.pptx" shown below).
No progress on this so far, it's not been super high on my list and nobody has taken it on.
Please file a separate bug report for anything else so it's easier to keep track of things, thanks!