Filter big image tiddlers

81 views
Skip to first unread message

Christoph Chalfin

unread,
May 26, 2021, 8:06:48 AM5/26/21
to TiddlyWiki

Hello,

I am currently building a tiddlywiki with many images. I have to embed these images directly into the tiddlywiki, as external links via _canonical_uri would not show on IPad.

I accidentally added some pictures without resizing them, so there are some big ones in my tiddlywiki. I would like to filter them and resize them.

Is there a possibility to find pictures with a specific file size? Or height/width?

Thank you!

Jeremy Ruston

unread,
May 26, 2021, 9:00:19 AM5/26/21
to tiddl...@googlegroups.com
Hi Christoph

The width and height of images are not directly accessible to wikitext, but you can filter on the size of the images in bytes. For example, try this in the “filter” tab of advanced search on tiddlywiki.com to return all images greater than 10,000 bytes:

[all[tiddlers+shadows]is[image]] :filter[get[text]length[]compare:number:gteq[10000]]

Best wishes

Jeremy.


--
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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/fc0eba3c-0fd1-41d2-be73-05fdf9dc6524n%40googlegroups.com.

Eric Shulman

unread,
May 26, 2021, 9:14:18 AM5/26/21
to TiddlyWiki
On Wednesday, May 26, 2021 at 6:00:19 AM UTC-7 Jeremy Ruston wrote:
[all[tiddlers+shadows]is[image]] :filter[get[text]length[]compare:number:gteq[10000]]

Alternatively, the following wikitext will generate a table listing all image tiddlers with their size, sorted in descending order
<$vars length="[get[text]length[]]">
<$list filter="[all[tiddlers+shadows]is[image]!sortsub:number<length>]">
   <tr><td><$link /></td><td><$text text={{{ [<currentTiddler>get[text]length[]] }}}/></td></tr>
</$list>
</table>

enjoy,
-e

Christoph Chalfin

unread,
May 27, 2021, 6:21:02 AM5/27/21
to TiddlyWiki
Perfect, thank you very much - I will try both solutions
Reply all
Reply to author
Forward
0 new messages