I have created an image called home.png and placed it into the same directory as my test story (documents/twine/stories/) and used the following syntax in a passage:
[img[home.png]]
This is the exact syntax used in the sugarcube 2 documentation but it refuses to display when i test the story in twine 2.
I get this:
https://i.imgur.com/Sp6miCO.png
and inspecting the HTML shows everything should be fine:
https://i.imgur.com/xtVYMKs.png
I have no idea what's wrong. Can anybody help?
Comments
Basically, just publish a TEST file, or something. <<if>> it still is not showing up in the browser, THEN you have something wrong, but this is almost certainly just the lack of image support.
Trust me, it gets REALLY annoying when you're using imagemaps for navigation between areas in a game. Having to test-pub a new file and open it in another program EVERY TIME I want to test my progress can be really annoying sometimes.
The technical reason why you can't display/play a media file (like an image) using a local reference URL while using either the Test or Play options is because the temporary HTML document created by those two options only exists in memory, thus there is no physical HTML file (1) for the media file to be relative to.
(1) Some environments may create a related physical operating system level temporary file within it's own temporary file storage area, but relying on this fact is not a good idea.