0 votes
by (120 points)
so maybe i'm just dumb but i've looked at every image embedding tutorial i could find and nothing is working for me? i've tried publishing to file and saving my image within that folder, i've also tried using links and base 64 encoding and all of those give me nothing. it was working before and then i wanted to change the image and uploaded the new image to the same host and just swapped the urls and now not even the image that worked a minute ago will show up

1 Answer

0 votes
by (159k points)

Without an example of the non-working code you are using it is a little difficult to determine why it no longer works.

Using a Relative URL to access a media file like an image.

As long as the media file is being stored within the same folder (or a child folder of this folder) as the generated Story HTML file then the media file should be accessible. This is also true for HTML & media files being hosted on the same web-server.

eg. if you have the following Relative URL in your Story HTML file.

<img src="media/forest.png" />

...and if the Story HTML file (adventure.html) is being hosted within the root of your web-server then the file structure should look something like the following:


... and you should be able to directly access the media in your web-browser using a URL like the follow: