So far adding images in my files doesn't work
If you're testing inside Twine then the image will need an absolute path (one where you tell it exactly where the file is in your directory structure, such as "C:/Games/MyGame/images/pic.jpg"). However, if you publish to an HTML file and open that published file up, you can use a relative path (a path relative to the location of the HTML file, such as "images/pic.jpg" if the HTML file is in "C:/Games/MyGame").
When developing my code I put the following at the beginning of my JavaScript passage:
if (window.hasOwnProperty("storyFormat")) {
setup.Path = "C:/Games/MyGame/images/"; // Running inside Twine application
} else {
setup.Path = "/images/"; // Running in a browser
}
Then I can do either of the following in my Twine passages:
Twine image code:
[img[setup.Path+'picture.jpg']]
HTML image code:
<img @src="setup.Path+'picture.jpg'">
NOTE: If you want to use the "@" HTML attribute directive I'd recommend updating to the latest version of SugarCube since there was a bugfix for this in v2.23.5.
Unfortunately this trick won't work in the Stylesheet section so you'll either have to A) change the CSS at runtime (jQuery makes this pretty easy) or B) manually change the stylesheet depending on where you're going to be looking at your Twine story. Here's how you could do it using the first method:
<<run $("body").css("background-image", "url('" + setup.Path + "pic.jpg')")>>
That sets the CSS property on the "body" so that it will load the background image that you want there.
See the jQuery css() documentation for details.
Hope that helps!