TW5 question about embedded image links

112 views
Skip to first unread message

David Gifford

unread,
Dec 9, 2014, 4:49:05 PM12/9/14
to tiddl...@googlegroups.com
Hi all

Just curious what the practical difference is between creating a tiddler with an image link like this:

<img src="http://blablabla.jpg">

and creating a tiddler with an image link like this:

[img[http://blablabla.jpg]]

and creating a tiddler with an image link like this:

field: _canonical_uri http://blablabla.jpg

Other than the fact that the second method takes longer and requires you to remember the long and techish term _canonical_uri?

I have looked at several of the embedding images how tos (tiddlywiki.com, tb5, and Wiki reference wiki), but am left unclear why the last of the three methods was even created in the first place. I am confident there is a reason, thus my question. Thanks.


Jeremy Ruston

unread,
Dec 9, 2014, 5:15:44 PM12/9/14
to TiddlyWiki
Hi Dave

The [img[url]] syntax creates an instance of the <$image> widget. That means that you can use it with URLs or with images that have been imported as tiddlers. The HTML <img> syntax only works with URLs.

If you're just manually creating links to images then probably the main reason to use the _canonical_uri approach is so that you can refer to an image via a convenient tiddler title instead of the long URL. Users can also open external image tiddlers directly in the story view, without needing to open a tiddler and type some codes.

The purpose of the _canonical_uri field is to enable us to build TiddlyWikis that refer to image tiddlers via a URL instead of embedding it as a base 64 URI - it was actually implemented in response to your experiments with 80MB TiddlyWiki's containing lots of images.

With external images, we can have a single representation of an image tiddler on the server, but have the freedom to elect to serve it to the browser either as an external image or embedded into the file.

Best wishes

Jeremy




--
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

David Gifford

unread,
Dec 9, 2014, 7:01:27 PM12/9/14
to tiddl...@googlegroups.com, jeremy...@gmail.com
Thanks, Jeremy, but:


If you're just manually creating links to images then probably the main reason to use the _canonical_uri approach is so that you can refer to an image via a convenient tiddler title instead of the long URL. Users can also open external image tiddlers directly in the story view, without needing to open a tiddler and type some codes.

But since I mentioned creating tiddlers with the html or [img[ text, then can't I still do both of these things? That is, refer to an image with a tiddler title, or open a tiddler of an external image in the story view from another tiddler?

Dave

Jeremy Ruston

unread,
Dec 10, 2014, 5:55:59 AM12/10/14
to David Gifford, TiddlyWiki
Hi Dave

But since I mentioned creating tiddlers with the html or [img[ text, then can't I still do both of these things?

I'm not quite sure what you mean. We're talking about the differences between the different ways of displaying images. What is that you're thinking you can't do?
 
That is, refer to an image with a tiddler title,

You can only refer to an image with a tiddler title if that tiddler is the embedded image.
 
or open a tiddler of an external image in the story view from another tiddler?

"External image" normally refers to the _canonical_uri mechanism. Such a tiddler, if opened directly in the story river will display as usual.

But referring to an external image via a URI via [img[]] or <img> will not enable you to open that image directly in the story river. You'd only be able to open a tiddler that transcludes that image.

Best wishes

Jeremy.

 

Dave
Reply all
Reply to author
Forward
0 new messages