Twine for Beginners: Adding Images as Base64

Twine 2 lets you do a whole lot with simple text and hyperlinks, and it couldn’t be easier to get started. If you want to take things a step further and add images as well, that’s not hard either! There are actually a few different methods of doing this, each with their own strengths and weaknesses. This guide will lead you through my favourite.

About Base64:

Base64 is a method of encoding binary data as strings of text. Put simply, it takes all the 1s and 0s that make up a file (such as a JPEG, PNG or GIF) and translates them into an ungodly string of letters, numbers and symbols that you can paste directly into Twine.

Why would anybody do this, you ask? Because this allows you to include images as part of your Twine game. If you want to share your game with people, you can send them the finished HTML file (or upload it somewhere such as philome.la), and any pictures you’ve added in this way will be right there inside it. Here’s a run down of why you might (and might not) want to use this option:

Benefits of including images as Base64:

  • Images are stored right inside the game (so only one file to upload/send).
  • Images do not have to be hosted on an external site (which may not always be available)
  • Images will display properly when previewing the game using Twine 2.
  • Images do not require an internet connection.
  • It’s fairly foolproof. A minor point, but including images in this way eliminates the possibility that your player will move files around in a way that prevents the game from finding them when it needs to.

Drawbacks of including images as Base64:

  • Significantly increases size of game file.
  • Adds a vast amount of text to the editor, which may make it run slowly.
  • Images (particularly large images) may take some time to load.
  • Base64 encoded images will be larger than the original files.
  • Harder to edit images included in this way.

For the most part, the benefits significantly outweigh the drawbacks. However, if you’re going to make heavy use of Base64 images then I do recommend downloading and installing Twine 2 rather than using it in your browser. The reason for this is that Twine 2 has only a limited amount of storage available to it in your browser, and images will eat into this significantly. If you download and run it directly on your computer, the only limit is the size of your hard drive (which a few JPEGs are unlikely to fill).

How to do it:

The basic code to include an image as Base64 looks like this:

<img alt=”AN OPTIONAL DESCRIPTION OF THE IMAGE” src=”data:image/TYPE OF FILE;base64,A HUGE STRING OF BASE64 GIBBERISH” />

The portions in bold are things I’ve stuck in just to illustrate what should go there. Here’s a specific example:

This is a 100×100 pixel PNG of some bananas. A JPEG or GIF would be equally suitable. There are loads of services online that will convert images into Base64 strings. I recommend this one. When I upload the image, here’s what it spits out:

The box labelled “Image Source” contains everything you need (but no description of the image, which is helpful to visually impaired players using screen readers, and to you to keep track of what goes where). The box labelled “Base64 String” contains, unsurprisingly, the actual Base64 string representing the image. It’s long. To include these bananas in a Twine game, I would write this:

<img alt=”bananas” src=”data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4wUeDjY7Fqs5CwAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAAgAElEQVR42uy9eazk2XXf9zn33t9S9are1nv3TE/PNDkzFDlcRqYoSpZlSomsXVEgUQlsJAIcIHYSJAqsBIbhOAKCwLCCwLENm0hiKVYEK3ISy6YtWYJkSqEoksNlOMPh7Gv39PK63/6q6le/5S4nf9waJgESIAlHEjnDAhqNXt57hd/3nnvO+Z7v95SoqvLN19fNy3zzEXwTkG++3iqAxBjf8oC4r/c3+PRXnuZzjz3GC88+y+2dmxhjeeDKZd79yCPcd+UK8+MT9g4O+PGf+ChVXX/DAyJfT0ldVVFVnnrySX7ll/4HPv+5z2FJhNCxNlpjMZ9RVxWxn3GyDHR9y+HJkqqseOcj7+d//sf/mM3NrW9GyNf6ak4OaI9vcXKww3NPfYXf/M1P8MyL17hwdpvRaI1lc8Lrt/eYVobjwxnjyjJyiZOF0PuEcZEnn3iC5559lg9/x3d+E5D/XyDMF+xfe4xm5zPIsEfoexZ9zf7LN7h27Tp9UObNkmaxAI04sRT1hCubWzSzQ3xUttcdhbPsLlou33PvNzwYf2SAxDAQQ4dvZ8wPrnF08/PM916lMCek1KPe0jSendsHvPL0S5SDcKnyHC48Ykr84FmfjrFO2D864u7hgmHoiVIhmrCa+Es/+7NviaT+puSQGCNxaBDtSTESgidFz9Du0zfXGZpduvltfDtDU0cKnhiUbjHjeG+Xm9fucvPmjJOTjuOl4APMushsqFjfOIUtaxbtQLNcsnu0YL3oEJTdRUKMYzzd5KXXb729q6xheUJ/8gKpuQbxBGMTESUOLU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pKFnmfvoRYHXx1m1t/GvsNHSdNrk5/PjZ/huV/sZGFyP7m+TJ4ohILKNkhTwfxlh5IO4wxp4urjKzCoFPMLil7laeWSfhnLaiUjqS7U3VKIsLyWkkceO8ya965/+yXkny//7lybsnOeYqFNf75Nf+4cCxcmmJqYJq1OsWblLMuHAlnuSLOcv804Hv/jCv46oegsdhk9PsZdq68/UOzVl45w/NkneG30SZY1IM9FTahLCMEyMxtoJdHiIwhPUQVKEx91lanLZxmlES7E0kMCeRrL9e4A7v7YNh7+1s/evgm5VpLqL3hvuTR1ivbYn1iYOszkyaMcHOtz4tJyNmzcxBcf2c699334dSXldau/9lme+vHXKc4fpNlwkSTY0CwWGanyNZQzQAlLaaNotDK6pjBFvrH10eTZes9QI5CnDmMVNNay44mX0Vq9cxJyvRg/c5p+v8cH79n0X/1O++wZxvb+kvbJA8xOvsRcVxOCZd1dgjwHazyDoqJbGLyLlNeyiqoyX/dhXHAIEWjkHms0p9qKbd/ZxWce2vL/k5A3OvqLHS5MnuT43t2MHfgdueySNzRaBZQ0uKCw1mOMxzgXZ684g7GWhZ6sXcA0p9sp9336y2z/5g6Gh4dvJeSNirHR5zh9+BnmJo5RLMwSwgCtbT2ZyGNt9F3pFoHOomLiomN8FjpGcHpymjzP3ll3yM0UVVlx+eI0vYW5iC5IhRks0u/O0+/1GLiMF0+MM7JyBUOtFpu3fPaG7rNbCbnJQt5aglsJuRX/Jv4OW3mUmnurqBMAAAAASUVORK5CYII=” />

Yeah. I wasn’t kidding when I told you it was long. At 13.5kB, this isn’t even a particularly large image. For comparison, the screenshot of the conversion tool is 305kb: its Base64 string would be 20 times as long!

Because they take up so much space (both in the file and on screen), you’ll most likely want to put any Base64 images in their own Twine passage, then use the (display:) macro to include them in your actual story. It’s the same process described in my tutorial on displaying random text (which can be similarly unwieldy). (display: “banana image”) is a lot easier on the eyes than this whole mess, and it means that the Base64 string itself only ever needs to be included in the game once.

To get a better idea of how this all fits together, you might like to try importing this example game by following the instructions laid out in this tutorial.

As always, if you make anything with the help of this tutorial, please leave a link in the comments below! You don’t need an account or even an email address – just leave your name and message and I’ll approve it as soon as I can.

One comment

  1. Pingback: Twine for Beginners: Adding Local Images | Damon L. Wakes

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.