Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Numinix MediaWiki Demo
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Help/Images
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Link behavior == <!--T:171--> </translate> <translate><!--T:172--> By default an image links to its file description page.</translate> <translate><!--T:173--> The "link=" option modifies this behavior to link to another page or website, or to turn off the image's linking behavior.</translate> <translate><!--T:174--> Alternatively, you can create a text link to a file description page or to the file itself.</translate> <translate><!--T:204--> See <tvar name=1></tvar>.</translate> <translate> === Display image, link it to another page or website === <!--T:180--> <!--T:181--> Use the "link=" option to link an image to another page or website: <!--T:182--> Clicking on the below image will take you to [[MediaWiki]]: </translate> <nowiki>[[File:MediaWiki-2020-logo.svg|50px|link=MediaWiki]]</nowiki> [[File:MediaWiki-2020-logo.svg|50px|link=MediaWiki]] <translate> <!--T:183--> Clicking on the below image will take you to ''example.com'': </translate> <nowiki>[[File:MediaWiki-2020-logo.svg|50px|link=http://example.com]]</nowiki> [[File:MediaWiki-2020-logo.svg|50px|link=http://example.com]] <translate> === Display image, turn off link === <!--T:184--> <!--T:185--> Use the "link=" option with no value assigned to turn the link off entirely; the below image is not a link: </translate> <nowiki>[[File:MediaWiki-2020-logo.svg|50px|link=]]</nowiki> [[File:MediaWiki-2020-logo.svg|50px|link=]] <translate> === Link to an image === <!--T:208--> <!--T:209--> Add <tvar name="colon"><code>:</code></tvar> as a prefix to the link you need to create. </translate> <nowiki>[[:File:MediaWiki-2020-logo.svg]]</nowiki> [[:File:MediaWiki-2020-logo.svg]] <nowiki>[[:File:MediaWiki-2020-logo.svg|Wiki]]</nowiki> [[:File:MediaWiki-2020-logo.svg|Wiki]] <translate> === Directly linking to an image === <!--T:242--> </translate> <translate><!--T:243--> The above examples link to the image's description page.</translate> <translate><!--T:244--> To directly link to an image, the pseudo-namespace <tvar name=1><code>Media:</code></tvar> can be used on MediaWiki pages:</translate> <syntaxhighlight lang="wikitext"> [[Media:MediaWiki-2020-logo.svg]] </syntaxhighlight> [[Media:MediaWiki-2020-logo.svg]] <translate> ====Direct links from external sites==== <!--T:245--> </translate> <translate><!--T:246--> Another possibility is to use the <tvar name=1>[[Special:Redirect/file]]</tvar> page (or its alias <tvar name=2>[[Special:Filepath]]</tvar>).</translate> <translate><!--T:247--> Unlike the above example, you can link to it from external websites as well as from MediaWiki pages.</translate> <syntaxhighlight lang="wikitext"> [[Special:Redirect/file/Wikipedia.png]] </syntaxhighlight> <translate><!--T:248--> The parameters <code>height</code> and <code>width</code> can also be added to return a specific size of the image.</translate> <translate><!--T:220--> The image aspect ratio is always preserved.</translate> <nowiki>https://www.mediawiki.org/w/index.php?title=Special:Redirect/file/Wikipedia.png&width=100&height=100</nowiki> <translate> ====Obtaining the full URL of an image==== <!--T:249--> <!--T:250--> To obtain the full path of an image (without going through redirects as shown above), some <tvar name=1></tvar> can be used. </translate> <nowiki></nowiki> <translate><!--T:212--> Becomes:</translate> : <translate><!--T:213--> In the event that this is used from a template where the <code>File:</code> namespace needs to be removed, <tvar name=1><code><nowiki></nowiki></code></tvar> can do so:</translate> <nowiki>}}</nowiki> <translate><!--T:214--> Becomes:</translate> :}} <translate>
Summary:
Please note that all contributions to Numinix MediaWiki Demo may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Project:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)