Images

1. Add images to your story

Images can be an exciting addition to your interactive story. Here you will learn how to add them.

1.1 Saving your image

Your image needs to be in a folder in the same location where you're going to save the HTML versions of your story.

Your structure should look like this:

  1. Create a folder where you'd like to save your HTML files:

    Screenshot of the folder 'HTML Twine Files'
  2. And inside that folder create a folder called "images":

    Screenshot of the folder 'HTML Twine Files', with a folder named 'images'.

The folder "images" is where you will save all the images you'd like to add to your story.

1.2 Add your images into your story

After saving your image in the "images" folder, you can mark the place in your story where you'd like it to appear.

  1. Use the instructions: [img[]]

  2. Add the name of the "images" folder and you image: images/picturename.png

  3. This is how it looks:

    [img[images/picturename.png]]

Every time you want an picture to appear, make sure you use the image instructions with the name of the picture exactly where you want it to appear in your story. In a passage it could look like this:

Screenshot of how to integrate a picture in Sugarcube 2.

1.3 Seeing your images

You won't be able to see your images while "playing" your story from Twine. You'll need to download the HTML file and save it to the folder "HTML Twine Files" and open your story from there to see the images you've added.

Saving your story as a HTML file.

  1. In your story file in Twine, go to the menu to the right of the story name.

    Screenshot of the story name in Twine.
  2. Choose "Publish to File" to generate a HTML file of your story. Save it in the location "HTML Twine Files", the folder that contains the "images" folder.

    Screenshot of the options in a Twine story.
    Screenshot of saving a Twine file to HTML.

Play through your story to see the images

  1. Navigate to the folder "HTML Twine Files" where you've just saved your HTML file. Double-click to open a playable version in your browser.

  2. You should now see your images in your playable file.

    Screenshot of a Images in a playable file.

2. Image formats

Images must be in either jpg or png format.

You can use one of the following sizes:

4:5 (1080 x 1350 px)

1:1 (1080 x 1080 px)

1,91:1 (1080 x 566 px)

3. Takeaways

Make sure the folder where you save your images is called "images".
Make sure the folder "images" is in the folder where you save your HTML files.
Use this code to bookmark where you'd like an image to sit in your story: [img[images/picturename.jpg]]
The file name in the code must exactly match the name of the picture you'd like included.
Make sure you're legally allowed to use the photos in something that will be published and monetised.