Board Thread:Support Requests - Getting Technical/@comment-5030775-20190511214645

I created a template (here) that allows me to put together a list of cards and adds their image automatically. The problem with it is that I get the card images from another wiki and upload them here, and they don't all have the same MIME type; most use png, but some are jpg. The solution I came up with is this: | style="font-size:px" | It checks if the page for that card exists with the MIME type png and links it, and if not it links the image as a jpg. It works fine, but the template has to call #ifexist between 20 and 35 times per use, and it causes an issue when I use the template multiple times on one page (such as this one). Obviously there are too many expensive parser function calls and after a few uses it begins to only return false, meaning it will always try to interpret the image as a jpg, so it stops working.

I did come up with a solution: | style="font-size:px" | This works well enough by allowing me to specify that the image is a jpg if it isn't a png. I could use this; however it forces me to include an additional parameter for about a third of the cards. Is there a way I could check if the image exists in a way that doesn't use #ifexist but without using an extra parameter? It would save me a bit of work in making these lists of decks. 