In my project I'm embedding artwork through the base64 method, which requires an img HTML link. I'm wondering if it's possible that I can link this image to a passage? Every method I've seen for linking appears to require
Passage in text, but the link isn't registered when I try it.
Comments
SugarCube 1.x (which comes with Twine 2) supports image based markup links, this ability is also supported by SugarCube 2.x
warning: If you are using the hosted release of Twine 2 then you need to be aware that the maximum size (in MBs) of a project is limited by your web-browser's localStorage maximum size setting, which is between 5 and 10 MB depending on the brand of web-browser. Embedding base64 encoded data can quickly increase the size of your project.
However something very odd I noticed is that the image on its own appears instantly, but when it's connected to a link it takes substantially longer to appear.
The named hook method you used cuts that time down dramatically, but it still takes a second to appear vs when there's no link at all. Is there anything I can do to avoid the lag?
Which web-browser / operating system are you using?
I have attached an Archive containing my test case story, which can be loaded via the Import From File option.
The image is 524x740 but it doesn't seem to make a difference if it's bigger or smaller. Nor does the browser, that was the first thing I tested and Safari, Chrome, and Firefox all have a lag when the image is linked vs when it's just on its own.
I don't have access to a OSX based machine, so I am unable to debug the issue for you.
Have you tried adding a similar img element to a vanilla HTML file to see if it is the loading of the base64 image that is causing the delay?
Something like the following:
eg. My previous hook/click combo example produces the following HTML
Do you get the same/similar delay in a Twine passage containing a wall of text and a no markup link?