Help:Filepath
From QED
filepath is a MediaWiki magic word that produces the full URL of an uploaded file. If the file is an image, the image will be displayed.
Usage: {{filepath:FILENAME}}
where FILENAME is the name of a file. If no such file has been uploaded, the result is empty.
Examples
{{filepath:foo.jpg}} produces
{{filepath:Trading_Morsels_-_Lewis_and_Runsten.pdf}} produces http://qed.princeton.edu/images/e/e9/Trading_Morsels_-_Lewis_and_Runsten.pdf
{{filepath:nosuchfile.jpg}} produces
Notes
In general, to embed an uploaded image on a page, it is suggested that a normal wikilink (e.g. [[Image:foo.jpg]]) or the <image> tag be used as they give greater flexibility. See Help:Images for further information.
One difference between filepath: and wikilinks is in the way they handle filenames of files that have not been uploaded. Compare:
- {{filepath:nosuchfile.jpg}} produces
- [[Image:nosuchfile.jpg]] produces Image:Nosuchfile.jpg












