Praxxian / lava-flow

A Foundry VTT module that allows you to import your notes from Obsidian MD into Foundry journal entries.
MIT License
58 stars 9 forks source link

Images are imported in the selected folder (img by default) but only the link shows in the journal page #35

Open PhilippeKr opened 1 year ago

PhilippeKr commented 1 year ago

But maybe I'm doing sopmething wrong in Obsidian, or my parameters are incorrect in the journal, but the end result is that the images are not present, only links (and the link shows for example the image size), but they don't point towards the image uploaded in Foundry.

Praxxian commented 1 year ago

Hi! Can you provide an example of the markdown you are importing? That will help me reproduce the issue and troubleshoot. Thanks!

PhilippeKr commented 1 year ago

Thanks a lot for the extremely quick answer. As I mentioned, I'm very new to Obsidian (I just drag the pictures in the docs) and not an expert on Foundry so I might be doing something wrong.

Anyway, here are the type of markdowns in my document:

![[Lady Fate.png|170]]

![[A - Darween - Small.jpg]]

A - Gaia -
Small.jpg

And here is what I get inside Foundry:

![[Lady Fate.png|170]]

![[A - Darween - Small.jpg]]

Just as a precision, the checkbox "Import non-markdown files" is checked, and the upload path is the default "img", and the pictures are indeed in that folder on Foundry. I'm using the Forge, if that makes any difference. Many thanks in advance, Philippe On Sun, 5 Mar 2023 at 21:00, Praxxian ***@***.***> wrote: > Hi! Can you provide an example of the markdown you are importing? That > will help me reproduce the issue and troubleshoot. Thanks! > > — > Reply to this email directly, view it on GitHub > , > or unsubscribe > > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Praxxian commented 1 year ago

I think the Forge uses an abstraction layer in front of S3 to store images. I wonder if that is causing the issue. There are other modules that upload images, so I might be able to do a little research to see if they have to implement anything special for The Forge.

mclearc commented 1 year ago

I'm also seeing this problem with just links not the images being displayed. And I'm serving my game locally, not from the cloud/forge/etc.

I'm on v11 of foundry.

SomeOats commented 9 months ago

I'm seeing the same issue. I'm also on v11 of Foundry, self hosting. The import of my images works fine, but the link to them breaks. I can see in the source of the journal entry the link in Obsidian. For example:

![[Risur.webp]]

This file is in my vault at /Images. In Foundry, I've set my upload path to worlds/zeitgeist-modded/images/gm.

After the import, I see a !null in the journal entry as text. The journal entry source shows ![[Risur.webp]] in plain text. In the interim, I've added this tag to my Obsidian notes:

<img src="worlds/zeitgeist-modded/images/gm/Risur.webp">

I still see the !null, but the image also shows up.

Praxxian commented 4 months ago

I just released a fix for #40 (thanks @SomeOats), and in the process I caught something dumb with how the image path was being set. If you upgrade to 3.0.2, does this issue persist?

gabecook commented 4 months ago

First, this is an excellent module. Thank you so much!

Second, I am hosting on Forge I just tried it and thought maybe I had this issue. However, what was really happening was that my images were not inside the folder that I was importing from my vault. I just moved the images into a subfolder of the folder I was importing and everything worked great. Images were present and imported into my Forge assets library.

I'm looking forward to planning my next session!

Praxxian commented 4 months ago

Great to hear!

Yes for all reporting this issue, please update to the latest version and make sure your images are within the folder or subfolders you are importing.

This is because browsers don't actually import directories. It sends a list of file paths. So if your image isn't in this list, it can't be imported.

This is expected behavior because it means your browser isn't snooping around your file system grabbing files you haven't told it to grab.

If there's anyone still having this issue after trying these steps to resolve, please let me know so I can troubleshoot further.

Praxxian commented 3 months ago

@PhilippeKr let me know if you are still having this issue after trying the following:

  1. Updating to the latest module version.
  2. Make sure your images are within the folder or subfolders you are importing.