Image transclusion not working for me

87 views
Skip to first unread message

TimP

unread,
Jan 25, 2019, 10:11:04 AM1/25/19
to TiddlyWiki
Hi, 

On Windows 10/chrome I downloaded an image to the same directory as my TW. 

This works: [img[burnStrawman.jpg]]

This does not: {{burnStrawman.jpg}}


Nothing shows in the JS console log. 

Am I doing something wrong?

cheers
Tim


Ton Gerner

unread,
Jan 25, 2019, 10:49:04 AM1/25/19
to TiddlyWiki
Hi Tim,

You can try at tiddlywiki.com:

[img[Motovun Jack.jpg]]

and

{{Motovun Jack.jpg}}

both work because Motovun Jack.jpg is an image tiddler, an embedded image.

The link you provided says:

If the image source is the title of an image tiddler then that tiddler is directly displayed. Otherwise it is interpreted as a URL and an HTML <img> tag is generated with the src attribute containing the URL.

So the first works also for images in the same folder as your TW.

Cheers,

Ton
 

Mark S.

unread,
Jan 25, 2019, 10:49:33 AM1/25/19
to TiddlyWiki
Hello Tim,

You can't transclude external resources, such as images.

I can see where your confusion comes from, though. In the docs you see:

{{Motovun Jack.jpg}}

which looks like a regular file name. But actually what is happening there is that it is transcluding a tiddler,
that happens to have a name that looks like a file name. If you go to tiddlywiki.com and put "motovun" in the search box,
you can navigate to the actual tiddler, "Motovun Jack.jpg"

A lot of the tiddlers, especially system tiddlers, look like file paths, which cause me a bit of confusion at first.

Good luck!
-- Mark

Tim Pizey

unread,
Jan 25, 2019, 11:37:43 AM1/25/19
to tiddl...@googlegroups.com
Thank you, 

I get it now, I think that the documentation could be improved here, I did assume that that was a local file url not a tiddler. 

cheers
Tim


--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/02c45709-a063-4d94-bdbb-740285de6ee7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

Tim Pizey

unread,
Jan 25, 2019, 12:28:18 PM1/25/19
to tiddl...@googlegroups.com
Hi, 

The tiddler 'Motovun Jack.jpg' on  https://tiddlywiki.com/ has a field 'source'.  
I do not have such a field available in the field drop down. I thought my version 5.1.11 might be the problem. 

I downloaded a new empty.html. Tried to create an image tiddler but  'source' field is not available. 

I am guessing that this is not longer a standard plugin?

thanks in advance. 
Tim



Mark S.

unread,
Jan 25, 2019, 12:44:04 PM1/25/19
to TiddlyWiki
Actually, I'm wondering if "source" is new. I thought external files were in field _canonical_uri .

You can make your own source field. Put in a URL with a path to the image. Change the tiddler type to reflect the image type.

-- Mark

Mark S.

unread,
Jan 25, 2019, 12:47:37 PM1/25/19
to TiddlyWiki
OK. Don't do what I said. The "source" field just documents the original source.

If you want to point to an external file, you will need to make a field "_canonical_uri" and put the path to your external image there.

You can learn about it here:


-- Mark

Tim Pizey

unread,
Jan 27, 2019, 1:11:21 PM1/27/19
to tiddl...@googlegroups.com
Thank you Mark.
TimP


For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages