Another little TW knowhow breakthrough for me… once I got the syntax right — so easy! I hope it helps others.
I understand, the OP may be asking how to rescale the image-thumbnail in-situ, and not open a 2nd tiddler.
I wanted to know how to make an external image in a tiddler, width set to thumbnail size, open the image-tiddler full-size. I was stuck on the syntax or unclear about the method.
I looked at IMAGES - every way to use them! — and read up on Button widget, ActionPopupWidget – but I was still lost — so I tested.
The solution, one tiny attribute… to
that points to the tiddler to navigate to
. Here are the steps…
-
create and name a tiddler, eg. MyChart
— we need to create a container pointing to an external image file.
-
at the bottom of the tiddler, set Type to match the image source e.g. image/png
or application/pdf
-
add a new field-name as _canonical_uri
with the field-value being the path to the external file, e.g. images/chart.png
-
in the parent tiddler, add a button to trigger opening the new tiddler.
<$button
class="tc-btn-invisible"
style="width: 50px"
to="MyChart"
>
{{MyChart}}
</$button>