Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

[Harlowe] Would a local img tag work?

I've been looking for ways to import images into my stories, and I've always assumed using something like <img src="images/test.png"> wouldn't work because it isn't supported in Twine 2 - and I've heard of solutions like reducing the images to Base64 first (but that is completely impractical because of how long the passages get then and how long the load times are). However, when on a hunch I tried simply importing an img using <img src="images/test.png"> it worked completely fine.

Why has nobody else suggested/recommended this solution? I'm honestly a bit surprised it works after scouring the forums and not finding one person suggesting this, but instead suggesting things like using the URL of the image or reducing an image to Base64 instead of simply importing it locally?

Comments

  • Chalk wrote: »
    Why has nobody else suggested/recommended this solution?/quote]
    Solutions similar to yours have been suggested a number of times, as can be seen here and here as two examples.

    The issue many have is that locally referenced media files generally can't be located when using the Test and Play options, this is because the generated temporary story HTML is not stored in a known location.

    Locally referenced files work correctly if the Publish to File option is used and the generated story HTML file is save in a location relative to the media files.
Sign In or Register to comment.