How to transclude a field in [img...] tag

I have a tiddler that has a field called image_uri that contains the URI of an image. I would like to display that image in that tiddler. I tried this:

[img [{{!!image_uri}}]]

Unfortunately it doesn’t work, nor do any of the slight variants of that. In this case the transclusion bit gets copied verbatim into the generated HTML, and the parser seems to be a bit uncomfortable with my request:

<img src="{{!!image_uri}}" class=" tc-image-error">

Suggestions?

Suggest reading over the documentation on the different kinds of attributes allowed: https://tiddlywiki.com/#Widget%20Attributes

You will then understand why the following works whereas your attempt did not:

<img src={{!!image_uri}}>

See also the image widget:
https://tiddlywiki.com/#ImageWidget

1 Like

Excellent, that did it. And thanks for the suggestions!