[TW5] Clicking on thumbnail to give full size image

87 views
Skip to first unread message

Jon

unread,
Dec 16, 2017, 1:41:09 PM12/16/17
to tiddl...@googlegroups.com
Hi, 

I came across the macro below from Mark S (here) which creates a clickable thumbnail image which then opens full size.

However, I've noticed that it doesn't work if the file name of the image has a gap eg. "image name.jpg"

Anyone know how to fix it for this situation?

Thanks
Jon


\define imageit(image:"image.jpg")
<a href=$image$ target="new"><img src=$image$ width="25%" height="25%" /></a>
\end

e.g.

<<imageit "TW-Images\chimps_77646868_3patrol.jpg">>


Mark S.

unread,
Dec 16, 2017, 3:15:42 PM12/16/17
to TiddlyWiki
Try putting quotes around the attribute values:

\define imageit(image:"image.jpg")
<a href="$image$" target="new"><img src="$image$" width="25%" height="25%" /></a>
\end

e
.g.

<<imageit "images/google_drive.png">>


Good luck,
Mark

Jon

unread,
Dec 16, 2017, 3:32:43 PM12/16/17
to TiddlyWiki
Hi Mark, 

thanks for your reply but unfortunately that doesn't seem to work...

Jon

Jon

unread,
Dec 16, 2017, 4:31:51 PM12/16/17
to TiddlyWiki
Correction - it does work!!

Sorry, I'd missed one of the quotes around the image file.

Great, thanks
Jon
Reply all
Reply to author
Forward
Message has been deleted
0 new messages