Board Thread:Support Requests - Getting Technical/@comment-5987409-20130802170049

I want to parse an #ifexist that checks for the existence of a file. The test needs to for all possible image extensions. It will be checked as part of a template.

e.g.

But where checks through all possible image extensions.

I realise that both "File:.png" and "File:.jpeg" can exist at the same time. As such the only way that comes to mind is to nest multiple #ifexist checks that check for first png, then jpeg, then jpg then gif then svg and the first one that evaluate trues plops out the file.

However this seems like a really inelegant way to get what I'm looking for. Moreover it really increases the number of #ifexist calls per template.

Any suggestions on an alternative other than nesting #ifexist? 