Template:File link/doc
Template Talk
< Template:File link
This is a documentation subpage for Template:File link.
It contains usage information, categories and other content that is not part of the original template page.
This template uses Lua:
This template is used to construct wikitext links to files. It is primarily useful for templates that use complicated logic to make file links. Simple file links should be made with wikitext markup directly, as it uses less resources than this template. For help with wikitext file markup please refer to the documentation at mediawiki.org.
Basic usage
{{file link|file=filename}}
All parameters
{{file link | file = filename | format = | formatfile = | border = | location = | alignment = | size = | upright = | link = | alt = | caption = | page = | class = | lang = | start = | end = | thumbtime = }}
Whitespace will be trimmed from parameters, and blank values will be ignored. This is to make it easier to construct complicated file links using templates. If you wish to use a blank value for syntax such as [[File:Bad Title Bad Title Example.png|link=]] then you can use the special value _BLANK. The template will convert this into a true blank value.
The available parameters are:
To see the effect of each of these parameters, see the images help page on mediawiki.org.
DescriptionCodeOutputRendered output
With the file only{{file link|file=Bad Title Example.png}}
[[File:Bad Title Example.png]]
With format, size, link and caption options{{file link|file=Bad Title Example.png|format=thumb|size=220px|link=Wikipedia:Sandbox|caption=An example.}}
[[File:Bad Title Example.png|thumb|220px|link=Wikipedia:Sandbox|An example.]]
An example.
With format, size, and border{{file link|file=Bad Title Example.png|format=frameless|size=220px|border=true}}
[[File:Bad Title Example.png|frameless|border|220px]]
With _BLANK{{file link|file=Bad Title Example.png|format=thumb|link=_BLANK}}
[[File:Bad Title Example.png|thumb|link=]]
See also
{{Remove file prefix}}

Last edited on 30 April 2020, at 17:32
Content is available under CC BY-SA 3.0 unless otherwise noted.
Privacy policy
Terms of Use
HomeRandom Nearby Log in Settings DonateAbout WikipediaDisclaimers