In twine 1.x it was possible to add pictures without the need to link them to a url. Twine would add them to the html file and there was no need to resort to links. Im kinda missing the same functionality in twine 2.0 So far im liking twine 2.0 better than 1.x and i would like to learn more about it - but i also wat to add pictures without external sources.
It is possible? Am i missing something?
Comments
This embedding-in-HTML-directly is called Base64 encoding, and if you search the forum, you'll find that unfortunately, there isn't yet an automated way in Twine 2.x to handle images. If you look at the Twine 2.x issue queue, you'll see there's been some discussion but it's not yet on the roadmap for 2.1 or anything.
Obviously, that you've seen it done in Twine 1.x should be good evidence that it's possible, but for now, you'll have to do it manually in Twine 2.x.
I searched Google for "Base64 image encoder"--they all pretty much work the same way, so I was just looking for one that looked nice. I found this: http://www.freeformatter.com/base64-encoder.html
It's even got some help text at the bottom to tell you how to make use of the Base64-encoded string. (Remember to specify in your IMG tag what format the image is in. If your uploaded filename ends in JPG or JPEG, you'll want to use 'jpeg' in the SRC string in your HTML code.)
As you can see from the help text, Base64 encoding isn't limited to images, and while this page doesn't mention it directly, it IS possible to Base64-encode audio as well!
Here's an example of image encoding. If you copy this code exactly into your Twine 2.x game, you should see the Twinery forum logo when you run your game.