javalent / fantasy-statblocks

Create Dungeons and Dragons style statblocks for Obsidian.md
MIT License
346 stars 72 forks source link

🐞 Image container is empty if monster property name of it is not "image" #300

Closed silentjames closed 10 months ago

silentjames commented 10 months ago

Check for existing bug reports before submitting.

Expected Behavior

Image container works with any property name.

Current behaviour

I have two images in my statblock with properties named "img" and "img_alt". After 3.15.7 update image containers become empty, I get only <div class="statblock-inline-item group-container"></div>. But if I change property name from "img" to "image", everything is working as expected. There is also the warning in the console:

No image could be loaded
l @ plugin:obsidian-5e-statblocks:659
eval @ plugin:obsidian-5e-statblocks:659
xm @ plugin:obsidian-5e-statblocks:659
V @ plugin:obsidian-5e-statblocks:640
wr @ plugin:obsidian-5e-statblocks:659
Q @ plugin:obsidian-5e-statblocks:663
Q @ plugin:obsidian-5e-statblocks:663
Q @ plugin:obsidian-5e-statblocks:663
Um @ plugin:obsidian-5e-statblocks:663
V @ plugin:obsidian-5e-statblocks:640
Cr @ plugin:obsidian-5e-statblocks:663
Vc @ plugin:obsidian-5e-statblocks:663
Lm @ plugin:obsidian-5e-statblocks:663
qc @ plugin:obsidian-5e-statblocks:663
p @ plugin:obsidian-5e-statblocks:663
lf @ plugin:obsidian-5e-statblocks:640
ir @ plugin:obsidian-5e-statblocks:640

Reproduction

  1. Create Image block;
  2. Link monster property as "img";
  3. Add statblock to a note and add a wikilink to a local image;
  4. Switch to reading mode -> no image are displayed;
  5. Go to statblock settings and change monster property from "img" to "image";
  6. Return back to the note -> image is here.

Which Operating Systems are you using?

Obsidian Version Check

1.4.16 and 1.4.13

Plugin Version

3.15.7

Confirmation

Possible solution

No response