0 votes
asked by (120 points)

I'm working on a Harlowe story, and using absolute links in HTML image tags to get my images.

This is Toggle.
<img src="https://github.com/wiredferret/Toggle/blob/master/img/20171001_191226.jpg?raw=true" width=500 alt="Space explorer in space suit, blue and gray">

However, the images aren't appearing. On further investigation, I see that the "published" generated file, although it is HTML, is not properly respecting the <img> tag.

This is Toggle.
&lt;img src=&quot;https://github.com/wiredferret/Toggle/blob/master/img/20171001_191226.jpg?raw=true&quot; width=500 alt=&quot;Space explorer in space suit, blue and gray&quot;&gt;

It's escaping out the HTML tag characters for some reason.

So far I have tried:

  • Resetting the "start here" state
  • Switching formats and switching back
  • Exporting and reimporting

This is probably a setting I'm missing, but it might be a bug?

1 Answer

0 votes
answered by (62.6k points)
edited by

If you opened the file in a text editor and looked at the data chunk, then that's what you're supposed to see because passages within the chunk are encoded.

If when playing your published file you aren't seeing the image, then the problem lies elsewhere.  Does your published file work otherwise?  Are you confusing the published file with the data file, which is also an HTML file, within your Twine/Stories directory?

As a final note: I tried your sample code and it worked just fine for me (in Harlowe v2.1.0), both in-Twine 2 and when published.

Welcome to Twine Q&A, where you can ask questions and receive answers from other members of the community.

You can also find hints and information on Twine on the official wiki and the old forums archive.

See a spam question? Flag it instead of downvoting. A question flagged enough times will automatically be hidden while moderators review it.