Nevermind, solved it using HTML like this: <object data="Race_Vulcan.png" class="basic_image"> <img src="Race_Vulcan.jpg" class="basic_image"> </object>
On Sat, Mar 5, 2016 at 9:57 PM, David Allen <dvainwebbc...@gmail.com> wrote: > 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 a topic in the > Google Groups "TiddlyWiki" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/tiddlywiki/5CzIAf9hJI4/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > tiddlywiki+unsubscr...@googlegroups.com. > To post to this group, send email to tiddlywiki@googlegroups.com. > 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 > <https://groups.google.com/d/msgid/tiddlywiki/b43ef77e-18ed-49fd-ba69-6fa616178fc0%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- David Allen -- 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+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@googlegroups.com. 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/CALaYjLg66k4DgFPTpKR5ziV_J0a0T04PnjsSsQeMy-V-637d4g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.