Controlling the size of an image on a page in Trunk Notes

I’m going to start posting answers to some emails as blog posts. Lots of you ask interesting questions about Trunk Notes and Go Calc, the answers to which deserve wider audience.

A recent question was:

“Is it possible to control the size of the image shown on the wiki page? Having a smaller thumbnail that one could click on to access the full image would be helpful.”

The answer is yes, however I admit the syntax could be simpler.

If you had an image called 26122014.png to display a small version of the image you can write:

![](26_12_2014.png =150×150)

You may notice that the image is still the same width but stretched. The reason is the stylesheet which determines how your pages work.

To fix this turn in the custom stylesheet setting and remove the following text from the page Special:SetStylesheet:

#contents img {  
    width: 100%;  
}

The emailer then asked how to make this into a link. The answer is the slightly cumbersome:

[![](26_11_2014.png =150×150)](/File:26_11_2014.png)

Phew! What we need here is a Lua script to help. I will get something together and post the answer later. If anyone wants to beat me to it let me know!