Oh that went faster than I expected, I managed to make it happen. I would still choose the [[:Image:Small padlock.png]] (256 colours optimized octree palette @ 40kb) over the the [[:Image:Small padlock.jpg]] (compression level 10 (closer to "best quality") at 12kb) though. When comparing both images thoroughful, you will notice the jpeg "smudging" around all edges caused by the compression which only at compression level 1 (37kb image) disappears in this picture. This is why I personally prefer PNG anytime which also has been developed for a web standard. Please consider the course of action for images. --[[User:Ulviirala|Ulviirala]] 07:01, 27 May 2010 (UTC)
Aight, this might be the final edit. Unfortunately I couldn't come up with something cleaner and more efficient but it will do the job of helping in the change. Feel free to optimize this if you're more familiar with the wiki markups :)
<pre>{{#ifexist: Image:{{{name|{{PAGENAME}}}}}.{{{imagetype|jpg}}}
| [[Image: {{{image|{{{name|{{PAGENAME}}}}}.{{{imagetype|jpg}}}}}}|center|90px|A {{{name|{{PAGENAME}}}}}]]
| {{#ifexist: Image:{{{name|{{PAGENAME}}}}}.{{{imagetype|png}}}
| [[Image: {{{image|{{{name|{{PAGENAME}}}}}.{{{imagetype|png}}}}}}|center|90px|A {{{name|{{PAGENAME}}}}}]]
| [[Image: {{{image|{{{name|{{PAGENAME}}}}}.{{{imagetype|jpg}}}}}}|center|90px|A {{{name|{{PAGENAME}}}}}]]
}}
}}</pre>
The Pseudocode for this is:
<pre>IF a JPG image exists THEN
Display the JPG
ELSE
IF PNG image exists THEN
Display the PNG
ELSE
Display redlink for JPG</pre>
It turned out to be nested to finally display a redlink for a jpeg when no images exist, so nobody uploads another png instead. I couldn't find any documentation on the ''imagetype'' keyword at all so I don't know if this could be written more tidy. :\ --[[User:Ulviirala|Ulviirala]] 09:48, 28 May 2010 (UTC)