Template:Infobox item/common.js

function tryImage(testImg) { var image = new Image; image.src = testImg;

var newImgUrl = new String("Unknown.png");

image.onload = function { // image exists and is loaded newImgUrl = testImg; } return newImgUrl; }