Infoboxes on my Wiki are designed to display an image, like most Wiki's infoboxes. Usually these images are internally hosted on the Wiki, but sometimes I provided URLs of thumbnails on Wikimedia Commons, I'd like to know how I can get these infoboxes to automatically detect if the file provided is a URL (hence an external file) or file title (e.g., Imatinib.svg, hence an internal file) and treat the image field accordingly (e.g., by adding File: to it if it is a file title, instead of a URL and sticking it within double square brackets [[]]). My guess is some sort of conditional (e.g., some form of #if) would be best suited to this.