[TW5] syntax [img[imagefile.jpg]] in node.js

345 views
Skip to first unread message

Michele Zaffalon

unread,
Jun 1, 2014, 1:07:55 AM6/1/14
to tiddl...@googlegroups.com
Hello,

I am a new user of TW5 on node.js (I am new to tiddlywiki in general) and I would like to display images in the wiki, directly and not as trasclusions, using the [img[path/to/folder/imagefile.jpg]] syntax. I read in the roadmap http://tiddlywiki.com/static/RoadMap.html that [img[url]] has been implemented, but there is no mentioning of files in the local filesystem. In TW5 standalone, the standard syntax [img[relative/path/to/folder/imagefile.jpg]] works. I have also read that node.js has full access to the filesystem, so it doesn't obey the same security restrictions as Javascript in the browser.

I am not sure this is the relevant commit, but the manual seems to be clear about it: https://github.com/Jermolene/TiddlyWiki5/blob/master/editions/tw5.com/tiddlers/wikitext/Images%20in%20WikiText.tid so this exchange https://groups.google.com/d/msg/tiddlywiki/u0pcaOIOdA4/9CesEgAHq7UJ does not seem to be valid anymore...

And finally <img src=...> also does not seem to be an option https://groups.google.com/d/msg/tiddlywiki/dIrdnKRfmj8/XQ94kJm5NIkJ unless images are served from http as well.

By the way for me also the link syntax <a href="file:///home/michele/imagefile.jpg">image</a> is not working for me (see https://groups.google.com/d/msg/tiddlywiki/EmJFLV1XAD0/ZL7_W8Jsa18J)

Thank you,
michele

Jeremy Ruston

unread,
Jun 2, 2014, 8:04:14 AM6/2/14
to TiddlyWiki
Hi Michele


I am a new user of TW5 on node.js (I am new to tiddlywiki in general) and I would like to display images in the wiki, directly and not as trasclusions, using the [img[path/to/folder/imagefile.jpg]] syntax. I read in the roadmap http://tiddlywiki.com/static/RoadMap.html that [img[url]] has been implemented, but there is no mentioning of files in the local filesystem. In TW5 standalone, the standard syntax [img[relative/path/to/folder/imagefile.jpg]] works. I have also read that node.js has full access to the filesystem, so it doesn't obey the same security restrictions as Javascript in the browser. 

The problem here is that the TW5 server components cannot (yet) serve individual image tiddlers over HTTP. ie, you can't display the image tiddler "myimage.jpg" by visiting http://127.0.0.1/tiddlers/myimage.jpg.
 
I am not sure this is the relevant commit, but the manual seems to be clear about it: https://github.com/Jermolene/TiddlyWiki5/blob/master/editions/tw5.com/tiddlers/wikitext/Images%20in%20WikiText.tid so this exchange https://groups.google.com/d/msg/tiddlywiki/u0pcaOIOdA4/9CesEgAHq7UJ does not seem to be valid anymore...

That's correct, the [img[]] syntax was implemented in 5.0.10-beta, released on April 19th.
 
And finally <img src=...> also does not seem to be an option https://groups.google.com/d/msg/tiddlywiki/dIrdnKRfmj8/XQ94kJm5NIkJ unless images are served from http as well.

That's correct.
 
By the way for me also the link syntax <a href="file:///home/michele/imagefile.jpg">image</a> is not working for me (see https://groups.google.com/d/msg/tiddlywiki/EmJFLV1XAD0/ZL7_W8Jsa18J)

Does it work if you link to a http:// website?

Best wishes

Jeremy
 

Thank you,
michele

--
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

Michele Zaffalon

unread,
Jun 2, 2014, 11:30:03 PM6/2/14
to tiddlywiki
Thank you, Jeremy. 
 
The problem here is that the TW5 server components cannot (yet) serve individual image tiddlers over HTTP. ie, you can't display the image tiddler "myimage.jpg" by visiting http://127.0.0.1/tiddlers/myimage.jpg.

I take it that "(yet)" means there is the plan to support it in the future. Will it be near future? Will the syntax be [img[path/to/local/file]]?

By the way for me also the link syntax <a href="file:///home/michele/imagefile.jpg">image</a> is not working for me (see https://groups.google.com/d/msg/tiddlywiki/EmJFLV1XAD0/ZL7_W8Jsa18J)

Does it work if you link to a http:// website?

Yes, <a href="http://...">link</a> works on 5.0.12 for me.

Best regards,
michele

Jeremy Ruston

unread,
Jun 3, 2014, 8:14:45 AM6/3/14
to TiddlyWiki
Hi Michele


I take it that "(yet)" means there is the plan to support it in the future. Will it be near future? Will the syntax be [img[path/to/local/file]]?

Yes, it should be working in the next couple of months. The syntax will definitely use [img[]], and the plan would be to set up the base path so that images can be referenced directly by their tiddler title.

Best wishes

Jeremy

 
By the way for me also the link syntax <a href="file:///home/michele/imagefile.jpg">image</a> is not working for me (see https://groups.google.com/d/msg/tiddlywiki/EmJFLV1XAD0/ZL7_W8Jsa18J)

Does it work if you link to a http:// website?

Yes, <a href="http://...">link</a> works on 5.0.12 for me.

Best regards,
michele

--
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.

Michele Zaffalon

unread,
Jun 3, 2014, 8:30:14 AM6/3/14
to tiddlywiki
Hi Jeremy,

Thank you for the clarification: I look forward to the feature.

Best regards,
michele

Kyrylo Silin

unread,
Oct 15, 2014, 12:43:47 PM10/15/14
to tiddl...@googlegroups.com, jeremy...@gmail.com
Hi! Have things changed? It seems like I still cannot reference local images, which is annoying.

    % tiddlywiki --version
    5.1.2

Jeremy Ruston

unread,
Oct 15, 2014, 12:47:14 PM10/15/14
to Kyrylo Silin, TiddlyWiki
Hi Kyrylo

> Hi! Have things changed? It seems like I still cannot reference local images, which is annoying.

The [img[url]] syntax has indeed been implemented:


Best wishes

Jeremy

Michele Zaffalon

unread,
Oct 15, 2014, 11:23:20 PM10/15/14
to tiddlywiki, Kyrylo Silin
Hi Kyrylo,

The answer is not yet for node.js. I am also waiting for it.
michele

Maaaaaaaaaaaaaaartin

unread,
Jul 14, 2016, 7:04:23 AM7/14/16
to TiddlyWiki, kyryl...@gmail.com
Any update on this? What would be the current best way to manage images in a nodejs TW? Thanks! Martin

Jeremy Ruston

unread,
Jul 14, 2016, 7:54:07 AM7/14/16
to tiddl...@googlegroups.com, kyryl...@gmail.com
Hi Martin

Any update on this? What would be the current best way to manage images in a nodejs TW? Thanks!

There’s no update at the moment, I’m afraid.

Best wishes

Jeremy

Rustem

unread,
Jul 14, 2016, 3:14:37 PM7/14/16
to TiddlyWiki, kyryl...@gmail.com
I was about to volunteer creating an issue for this, but turns out there is already one: #1000! :)
Reply all
Reply to author
Forward
0 new messages