Template:Image/doc: Difference between revisions

From FamilySearch Wiki
m (→‎Usage: update)
(removed template that doesn't exist and added wanted images)
 
Line 7: Line 7:
=== Usage ===
=== Usage ===


* <nowiki>{{Image | Example.svg | 20px}}</nowiki> → {{Image|Example.svg|20px}}
* <nowiki>{{Image | Example Image.jpg | 20px}}</nowiki> → {{Image|Example Image.jpg|20px}}
* <nowiki>{{Image | File:Example.svg | 20px}}</nowiki> → {{Image|File:Example.svg|20px}}
* <nowiki>{{Image | File:Example Image.jpg | 20px}}</nowiki> → {{Image|File:Example Image.jpg|20px}}
* <nowiki>{{Image | [[File:Example.svg|30px]] | 20px}}</nowiki> → {{Image|[[File:Example.svg|30px]]|20px}}
* <nowiki>{{Image | [[File:Example Image.jpg|30px]] | 20px}}</nowiki> → {{Image|[[File:Example Image.jpg|30px]]|20px}}


Note that additional parameters are (deliberately) ignored if full image syntax is passed in the first parameter. You can pass up to five parameters directly otherwise:
Note that additional parameters are (deliberately) ignored if full image syntax is passed in the first parameter. You can pass up to five parameters directly otherwise:
* <nowiki>Image  Example.svg  20px  thumb  none  Foo</nowiki> → Image  Example.svg  20px  thumb  none  Foo
* <nowiki>Image  Example.svg  20px  thumb  none  Foo</nowiki> → Image  Example.svg  20px  thumb  none  Foo


You can also pass arbitrary parameters accepted by the [[WP:EIS|Image syntax]] if you separate them with {{tl|!}}. You may need to number them explicitly if they contain an equals sign "=":
You can also pass arbitrary parameters accepted by the Image syntax if you separate them with {{tl|!}}. You may need to number them explicitly if they contain an equals sign "=":
* <nowiki>{{Image | Example.svg | 2= 20px{{!}}link=Main Page}}</nowiki> → {{Image | Example.svg | 2= 20px{{!}}link=Main Page}}
* <nowiki>{{Image | File:Example Image.jpg | 2= 20px{{!}}link=Main Page}}</nowiki> → {{Image | File:Example Image.jpg | 2= 20px{{!}}link=Main Page}}


=== See also ===
=== See also ===
* {{tl|Linked}}
* {{tl|px}}
* {{tl|px}}



Latest revision as of 13:19, 28 April 2020

This template can be used as a wrapper to simplify the inclusion of an image in a template, where users may use several different forms of syntax.

It is primarily of use in templates and should not be used in articles directly.

Usage[edit source]

  • {{Image | Example Image.jpg | 20px}} → Example Image.jpg
  • {{Image | File:Example Image.jpg | 20px}} → Example Image.jpg
  • {{Image | [[File:Example Image.jpg|30px]] | 20px}} → Example Image.jpg

Note that additional parameters are (deliberately) ignored if full image syntax is passed in the first parameter. You can pass up to five parameters directly otherwise:

  • Image Example.svg 20px thumb none Foo → Image Example.svg 20px thumb none Foo

You can also pass arbitrary parameters accepted by the Image syntax if you separate them with {{!}}. You may need to number them explicitly if they contain an equals sign "=":

  • {{Image | File:Example Image.jpg | 2= 20px{{!}}link=Main Page}} → Example Image.jpg

See also[edit source]