Embedding images and PDFs from local folders: how to?

118 views
Skip to first unread message

IvanPsy

unread,
Nov 29, 2020, 9:04:35 AM11/29/20
to TiddlyWiki
Greetings,

since I heavily rely on images and PDFs, but I don't want to overload my wiki, I'd like to keep such files external, maybe under a subfolder, and embed such files in my Tiddlers when needed.

Is it possible?
How?

Another thing: is it possibile to indicate a relative path to that subfolder, so that I can keep the structure if I move the whole wiki and its subfolders?
How?

Thank you!

Sylvain Naudin

unread,
Nov 29, 2020, 9:16:11 AM11/29/20
to TiddlyWiki
Hi Ivan,


Use of _canonical_uri.

Cheers,
Sylvain

TW Tones

unread,
Nov 29, 2020, 9:35:27 PM11/29/20
to TiddlyWiki
Ivan,

Also if this is published on the internet or only local to your machine can influence the best way to attend to this. TiddlyDesktop as example can make use of full local paths relative or absolute, even click to open or execute. Server implementation have another set of methods.

Tones

Patrice Neff

unread,
Nov 30, 2020, 4:59:45 AM11/30/20
to tiddl...@googlegroups.com
Hi Ivan,

On Sun, Nov 29, 2020 at 06:04:35AM -0800, IvanPsy wrote:
> since I heavily rely on images and PDFs, but I don't want to overload my
> wiki, I'd like to keep such files external, maybe under a subfolder, and
> embed such files in my Tiddlers when needed.
>
> Is it possible?
> How?

It is indeed. You want to use the `_canonical_uri` special field which achieves
exactly this. See
https://tiddlywiki.com/static/How%2520to%2520embed%2520PDF%2520and%2520other%2520documents.html.

Additionally have a look at the External Attachments Plugin, which allows
dragging & dropping such files into the wiki.
https://tiddlywiki.com/static/External%2520Attachments%2520Plugin.html

> Another thing: is it possibile to indicate a relative path to that subfolder,
> so that I can keep the structure if I move the whole wiki and its subfolders?
> How?

Yes, simply put them as relative into the `_canonical_uri` field. The plugin I
quoted above does this by default.

I have a `files` sub-folder, and all my files I simply include with the
canonical URI set to "files/my-attachment.pdf". Works like a charm with
TiddlyDesktop and also Quine on mobile.

Best,
Patrice

IvanPsy

unread,
Nov 30, 2020, 11:42:27 AM11/30/20
to TiddlyWiki
Thank you for your kind replies.

I'm not a tech so I didn't want to mess my Tiddly, so I installed the External Attachments Plugin: is it enough for PDFs and images?
Now I'm under Firefox, I drag and drop an image, but the menus and options are the usual: Tiddly asks me to import the image.
How do I attach external images with this plugin?

I've read your links, but I see them somewhat confusing.

Sylvain Naudin

unread,
Nov 30, 2020, 1:17:55 PM11/30/20
to TiddlyWiki
Hi Ivan,

External Attachments work with TiddlyDesktop mainly. So with Firefox it does nothing, that why you didn't see nothing else.
Reply all
Reply to author
Forward
0 new messages