_canonical_uri field fails

I’m following the instructions here ExternalImages I don’t know if something is incorrect or they are ambigious, but I cannot get this to wok as expected.

Here is what I have set up.

I have a folder /images in node.js
Placed a jpg image in the folder (myimage.jpg)
Create a tiddler, set type to image/jpeg
Added field _canonical_uri with value images/myimage.jpg

Just not displaying my image.

Those external images directions are showing how to create a stand-alone TW with complementary image files.

I think the actual serving directory for the TW static files portion of node is “files/”. Possibly the ExternalImages instructions should be rewritten to use that subdirectory for maximum compatibility.

2 Likes

Thanks for this steer. Indeed the images need to be located in a \files folder rather than \images folder which seem bizzare as the instructions read just the opposite. So, on this page Externalimages, edit

  1. Create image tiddlers in your TiddlyWikiFolders in the usual way
  2. Save the images as separate files (by convention, in a subfolder named images)
  3. Externalise the image tiddlers by giving them a _canonical_uri field
  4. Save the main HTML file

needs to be re-drafted to read

  1. Create a folder files in your wiki (at the top level)
  2. Place the images in that files folder e.g. myimage.jpg
  3. Externalise the image tiddlers by giving them a _canonical_uri field e.g. .\files\myimage.jpg. Save the tiddler and the image should appear in the tiddler
  4. Save the main HTML file

Could someone with editing privileges check and fix this please, unless I have this wrong!

Thanks

Thanks @myfta

The docs in “ExternalImages” under “Creating external images under Node.js” actually covers a slightly different scenario: that of using Node.js to save a wiki as a single HTML file with the image tiddlers automatically externalised into a separate folder called “images”.

So, the correction needs to clarify what the existing explanation covers, and add a new explanation for your scenario, which is around manually creating _canonical_uri tiddlers to reference image files kept in the files subfolder of the wiki folder.

Thanks, that’s interesting as you will see that’s what I’m trying to do! First step is to get the _canonical_uri working in the wiki, then export as a html with an associated image folder. It is not apparent how to do this from the instructions given.