FANDOM


I've been trying to get this to work. While I can eliminate it altogether resulting in "file_name.png", I wanted to see if I could make it work out added .png .jpg .gif and so on.

[[File:{{{avatar|Unknown-icon}}}{{#if:{{{avatar|}}}|.png|.gif}}|x113px|{{{name}}}]]
[[File:
{{{avatar|Unknown-icon}}}

{{#if:{{{avatar|}}}|.png|.gif}}

|x113px|{{{name}}}]]

The only time it 'detects' another format besides .png, is if the template's 'avatar' parameter is not in use and a dash is directly at the start. But the image itself won't appear. For example

{{Infobox
|avatar = file_name }}
{{Infobox
|file_name}}
Community content is available under CC-BY-SA unless otherwise noted.