eXaminator / kanka-foundry

FoundryVTT module to import information from kanka.io
MIT License
22 stars 8 forks source link

Use foundry hosted images in text #50

Closed jonepatr closed 3 years ago

jonepatr commented 3 years ago

Hope I'm not annoying you with the amount of issues I'm posting.

An Idea could be to use foundry hosted images in the text using a tag. Say for example {path/to/image/on/foundry/server.webp} could be used to display such a picture.

eXaminator commented 3 years ago

No worries, I'm happy to receive ideas and feedback, even if I might not be able (or don't intend) to implement all of them.

This is actually already possible, to a degree at least! You can just add an image and use any URL for it within Kanka. If you use the full URL you will even see the image in Kanka, while using only the path (i.e. something like world/myworld/myimage.jpg) will also work, though Kanka itself will show a broken image (it will work after importing it into Foundry though).

That being said, this obviously won't quite work when using the electron app version of Foundry (which I honestly never used and have never tested this module in myself...), though the relative path from above might actually work. But it's not something I really would want to officially suggest or support, because having a broken image in Kanka isn't great.

I'm also not sure how much I want to deviate between what you get in Kanka vs. what you get in the module itself. While I do understand that many people (me included) probably use Kanka as a pure GM tool, there are a lot of other people who also give players (or even the general public) access to their campaigns on Kanka. So I'll probably try to avoid any specific features that add any kind of special syntax or data to anything in Kanka that is not officially supported by the API - at least for now.

Though I am open for more insights into the specific use cases you have in mind, especially if the above suggestions / workarounds don't work for you.

jonepatr commented 3 years ago

Thanks! This completely covers my use case. I only wanted to add in pictures into the text, and forgot that I could just do that this way. Thanks for a great module and answering the issues so quickly! Very much appreciated.

eXaminator commented 3 years ago

That's strange. I just tested it!

Here's a what I have in Kanka: image image

And this is in foundry after my sync: image

Edit: This is my self hosted Foundry, not the Electron app. So YMMV in this regard. You might need to find out how the electron app handles image links. 🤔

jonepatr commented 3 years ago

Yeah I'm sorry, I was doing something strange I think, now it works. Sorry for wasting your time, and thanks again.

eXaminator commented 3 years ago

Like I said, no worries! I'll close the issue, but if you have any other cases just let me know and I might reopen.