I have multiple images that I'm using that are of various types, and I'd 
like to create a macro that can easily create the image code I need without 
having to switch over to my containing folder and find the image 
individually (I use TiddlyDesktop).  Is there some way I can determine if a 
file exists from TiddlyWiki before I try to use it as an image's path?

For example, I wanna generate the following:

<img src="Race_Vulcan.jpg" class="basic_image">

I can generate the line as-is with a macro easily, but I'd like the macro 
to change the extension of the filename if the file doesn't exist.  That 
way, all I have to type is <<fetch_image Race_Vulcan>> and it will generate 
the first <img> line if a file called Race_Vulcan.jpg exists, or fall back 
to Race_Vulcan.png, .bmp. etc if it does not.

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b43ef77e-18ed-49fd-ba69-6fa616178fc0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to