External Images from local hard disk

63 views
Skip to first unread message

Stephen Kimmel

unread,
Sep 21, 2017, 3:48:43 PM9/21/17
to TiddlyWiki
I know this has been discussed ad nauseum but I can't make it work for me. Can someone explain it to me, preferably in English and not rocketese, so I can understand it. I'm working in Firefox 55.0.3, on Windows 7.0, using Tiddlywiki 5.1.14. And I'm specifically working on parallax tiddlers. I have that working pretty well when using internal jpgS. I have gotten it to work with image files that reside on the hard disk in the root directory but I don't want to clutter that directory more than necessary.

The image I want to use is inori.jpg and it is located in C:/Images/Backgrounds/inori.jpg.

I've trying to create an image tiddler of type image/jpeg and added a source field. My first try was to enter file:///C:/Images/Backgrounds/inori.jpg in the source field since that worked with the browser itself and since something similar seems to work with Motovun Jack.jpg... but I get nothing. I've tried about every combination of forward slashes and back slashes I can come up with and nothing happens. I would try using a _canonical_uri if I had first clue what the appropriate entry would be in this case.

And this next part ... perhaps only Jeremy can answer this one... When I do figure out how to get my image into a wiki, will the datauri macro work on it?

PMario

unread,
Sep 21, 2017, 4:04:53 PM9/21/17
to tiddl...@googlegroups.com
Hi,

Let's say your TW is at   c:\test\tiddlywiki.html
And your images are at: c:\test\images\inori.jpg


Create a new tiddler named eg: inori.jpg.ext

select: type: image/jpg
add field: _canonical_uri: ./images/inori.jpg

Now you can use: inori.jpg.ext   like an internl jpg.

./images/inori.jpg    ... is called a relative link. So the TW now expects the imgage directory relative to the tiddlywiki.html file. ... If you copy the file you'll need to copy the image directory too. ...

Hope that helps.

have fun!
mario


PMario

unread,
Sep 21, 2017, 4:08:36 PM9/21/17
to TiddlyWiki
On Thursday, September 21, 2017 at 10:04:53 PM UTC+2, PMario wrote:
./images/inori.jpg    ... is called a relative link. So the TW now expects the imgage directory relative to the tiddlywiki.html file. ... If you copy the file you'll need to copy the image directory too. ...

Be aware, that these links only works for file://   tiddlywikis. .. It won't work out of the box, if you host your TW on the web. If you want it to work on the web, you'll need a real web server that can serve static files as a backend.

This is not a TW specific issue. That's a rule of the web!!
 
-mario

Reply all
Reply to author
Forward
0 new messages