+1 vote
by (170 points)
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:


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 have changed the format in Twine2 to use Sugarcube and not harlowe)

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?

2 Answers

+2 votes
by (2.1k points)
selected by
Best answer
Your issue is not with what you have written, it's with the Twine previewer itself. It does not support showing images like that. If you publish the story to its own folder and place the image there it should show up when you open the story HTML file.
+1 vote
by (159k points)

Further to @Superechidna's advice:

The folder accessed via the Twine > Show Library menu items, in your case the documents/twine/stories folder, is the location where the application stores the story Project files and that folder is meant for the application's internal use only. Do Not save the story HTML file you create via the Publish to File option within that folder or you may overwrite and lose your Project file.

The temporary story HTML file created via either the Test or Play options only exists in memory (1), which is why you can't access and display/play an external media file (like an image/video/audio) using a local reference URL like the one in your example.

(1) Depending on the environment you're using a accompanying operating system level temporary file may be created somewhere on your hard-drive(s).