https://baripedia.org/index.php?title=Module:InfoboxImage/doc&feed=atom&action=historyModule:InfoboxImage/doc - Historique des versions2024-03-29T10:14:06ZHistorique des versions pour cette page sur le wikiMediaWiki 1.38.2https://baripedia.org/index.php?title=Module:InfoboxImage/doc&diff=33725&oldid=prevSimon : 1 révision importée2018-02-07T15:16:54Z<p>1 révision importée</p>
<p><b>Nouvelle page</b></p><div>{{High-risk|2,860,000}}<br />
{{Module rating|protected}}<br />
<br />
==Overview==<br />
This module is used within infoboxes to process the image parameters and tidy up the formatting of the result.<br />
<br />
==Parameters==<br />
{| class="wikitable"<br />
! Parameter<br />
! Description<br />
|-<br />
| image<br />
| Required. The main parameter that should be passed over which contains the image info.<br />
|-<br />
| size<br />
| Size to display image.<br />
|-<br />
| maxsize<br />
| Maximum size to display image. Note: If no size or sizedefault params specified then image will be shown at maxsize.<br />
|-<br />
| sizedefault<br />
| The size to use for the image if no size param is specified. Defaults to [[Wikipedia:Autosizing images|frameless]].<br />
|-<br />
| alt<br />
| Alt text for the image.<br />
|-<br />
| title<br />
| Title text for image (mouseover text). If blank then alt text is used.<br />
|-<br />
| border<br />
| If yes, then a border is added.<br />
|-<br />
| page<br />
| The page number to be displayed when using a multi-page image<br />
|-<br />
| upright<br />
| If upright=yes, adds "upright" which displays image at 75% of default image size (which is 220px if not changed at [[Special:Preferences]]). If a value, adds "upright=''value''" to image, where values less than 1 scale the image down (0.9 = 90%) and values greater than 1 scale the image up (1.15 = 115%).<br />
|-<br />
| center<br />
| If yes, then the image is centered.<br />
|-<br />
| thumbtime<br />
| thumbtime param, used for video clips.<br />
|-<br />
| suppressplaceholder<br />
| If no, then will not suppress certain placeholder images. See {{section link||Placeholder images which can be suppressed}}.<br />
|-<br />
| link<br />
| Page to go to when clicking on the image.<br />
|}<br />
<br />
Note: If you specify the maxsize or sizedefault params, then you should include the px after the number.<br />
<br />
{{Use dmy dates|date=July 2016}}<br />
<br />
==Parameters displayed in image syntax==<br />
All parameters:<br />
:<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | size={{{size}}} | upright={{{upright}}} | alt={{{alt}}} | title={{{title}}} | thumbtime={{{thumbtime}}} | link={{{link}}} | border=yes | center=yes | page={{{page}}} }}</pre><br />
:<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | size={{{size}}} | upright={{{upright}}} | alt={{{alt}}} | title={{{title}}} | thumbtime={{{thumbtime}}} | link={{{link}}} | border=yes | center=yes | page={{{page}}} }}</code><br />
<br />
When "size" and "maxsize" are defined, the smaller of the two is used (if "px" is omitted it will be added by the module):<br />
:<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | size=300px | maxsize=250px }}</pre><br />
:<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | size=300px | maxsize=250px }}</code><br />
<br />
When "size" is not defined, "sizedefault" is used, even if larger than "maxsize" (in actual use "px" is required after the number; omitted here to show it is not added by the module):<br />
:<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | sizedefault=250px | maxsize=200px }}</pre><br />
:<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | sizedefault=250px | maxsize=200px }}</code><br />
<br />
When "size" and "sizedefault" are not defined, "maxsize" is used (in actual use "px" is required after the number; omitted here to show it is not added by the module):<br />
:<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | maxsize=250px }}</pre><br />
:<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | maxsize=250px }}</code><br />
<br />
When "size", "sizedefault", and "maxsize" are not defined, "frameless" is added, which displays the image at the default thumbnail size (220px, but logged in users can change this at [[Special:Preferences]]) and is required if using "upright" to scale the default size:<br />
:<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} }}</pre><br />
:<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} }}</code><br />
<br />
Use of "upright" without a number value, which displays the image at approximately 75% of the user's default size (multiplied by 0.75 then rounded to nearest 10):<br />
:<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | upright = yes }}</pre><br />
:<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | upright = yes }}</code><br />
<br />
When "alt" is used without "title", the alt text is also used as the title:<br />
:<pre style="overflow:auto;">{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | alt = Alt text }}</pre><br />
:<code>{{#invoke:InfoboxImage | InfoboxImage | image={{{image}}} | alt = Alt text }}</code><br />
<br />
For more information, see [[Wikipedia:Extended image syntax]].<br />
<br />
==Sample usage==<br />
<pre style="overflow:auto;"><br />
|image = {{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|upright={{{image_upright|1}}}|alt={{{alt|}}}}}<br />
</pre><br />
<br />
==Examples==<br />
{| class="wikitable"<br />
|-<br />
| <nowiki>{{#invoke:InfoboxImage|InfoboxImage}}</nowiki><br />
| {{#invoke:InfoboxImage|InfoboxImage}}<br />
|-<br />
| <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=}}</nowiki><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=}}<br />
|-<br />
|<br />
<nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg}}</nowiki><br /><br />
<nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=File:Abbey Rd Studios.jpg}}</nowiki><br /><br />
<nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Image:Abbey Rd Studios.jpg}}</nowiki><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg}}<br />
|-<br />
|<br />
<nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|upright=yes}}</nowiki><br /><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|upright=yes}}<br />
|-<br />
|<br />
<nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|upright=1.2}}</nowiki><br /><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|upright=1.2}}<br />
|-<br />
|<br />
<nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=100px}}</nowiki><br /><br />
<nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=100}}</nowiki><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=100px}}<br />
|-<br />
| <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=[[Image:Abbey Rd Studios.jpg|200px]]}}</nowiki><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=[[Image:Abbey Rd Studios.jpg|200px]]}}<br />
|-<br />
| <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=[[Image:Abbey Rd Studios.jpg|200px]]|title=Abbey Road!}}</nowiki><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=[[Image:Abbey Rd Studios.jpg|200px]]|title=Abbey Road!}}<br />
|-<br />
| <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250px|alt=The front stairs and door of Abbey Road Studios}}</nowiki><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250px|alt=The front stairs and door of Abbey Road Studios}}<br />
|-<br />
| <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250|alt=The front stairs and door of Abbey Road Studios}}</nowiki><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250|alt=The front stairs and door of Abbey Road Studios}}<br />
|-<br />
| <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250px|alt=The front stairs and door of Abbey Road Studios|title=Exterior, front view of Abbey Road studios}}</nowiki><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|sizedefault=250px|alt=The front stairs and door of Abbey Road Studios|title=Exterior, front view of Abbey Road studios}}<br />
|-<br />
| <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|alt=The front stairs and door of Abbey Road Studios}}</nowiki><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|alt=The front stairs and door of Abbey Road Studios}}<br />
|-<br />
| <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=100px|alt=The front stairs and door of Abbey Road Studios}}</nowiki><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=100px|alt=The front stairs and door of Abbey Road Studios}}<br />
|-<br />
| <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Bilbao.svg|size=100|border=yes}}</nowiki><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=Bilbao.svg|size=200|border=yes}}<br />
|-<br />
| <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Image is needed male.svg}}</nowiki><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=Image is needed male.svg}}<br />
|-<br />
| <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Image is needed male.svg|suppressplaceholder=no}}</nowiki><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=Image is needed male.svg|suppressplaceholder=no}}<br />
|-<br />
| <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=[[File:Image is needed male.svg|200px]]}}</nowiki><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=[[File:Image is needed male.svg|200px]]}}<br />
|-<br />
| <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=[[File:Image is needed male.svg|200px]]|suppressplaceholder=no}}</nowiki><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=[[File:Image is needed male.svg|200px]]|suppressplaceholder=no}}<br />
|-<br />
| <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=50px|maxsize=100px}}</nowiki><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=50px|maxsize=100px}}<br />
|-<br />
| <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=200px|maxsize=100px}}</nowiki><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|size=200px|maxsize=100px}}<br />
|-<br />
| <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=[[File:Abbey Rd Studios.jpg|200px]]|maxsize=100px}}</nowiki><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=[[File:Abbey Rd Studios.jpg|200px]]|maxsize=100px}}<br />
|-<br />
| <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|maxsize=100px|center=yes}}</nowiki><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=Abbey Rd Studios.jpg|maxsize=100px|center=yes}}<br />
<br />
|-<br />
| <nowiki>{{#invoke:InfoboxImage|InfoboxImage|image=no such image|maxsize=100px|center=yes}}</nowiki><!-- this issue sh'd be fixed somewhow--><br />
| {{#invoke:InfoboxImage|InfoboxImage|image=no such image|maxsize=100px|center=yes}}<br />
|}<br />
<br />
== Placeholder images which can be suppressed ==<br />
{|<br />
| style="vertical-align:top;" |<br />
* [[:File:Blue - Replace this image female.svg]]<br />
* [[:File:Blue - Replace this image male.svg]]<br />
* [[:File:Female no free image yet.png]]<br />
* [[:File:Flag of None (square).svg]]<br />
* [[:File:Flag of None.svg]]<br />
* [[:File:Flag of.svg]]<br />
* [[:File:Green - Replace this image female.svg]]<br />
* [[:File:Green - Replace this image male.svg]]<br />
* [[:File:Image is needed female.svg]]<br />
* [[:File:Image is needed male.svg]]<br />
* [[:File:Location map of None.svg]]<br />
* [[:File:Male no free image yet.png]]<br />
* [[:File:Missing flag.png]]<br />
* [[:File:No flag.svg]]<br />
* [[:File:No free portrait.svg]]<br />
* [[:File:No portrait (female).svg]]<br />
* [[:File:No portrait (male).svg]]<br />
* [[:File:Red - Replace this image female.svg]]<br />
* [[:File:Red - Replace this image male.svg]]<br />
* [[:File:Replace this image female (blue).svg]]<br />
* [[:File:Replace this image female.svg]]<br />
* [[:File:Replace this image male (blue).svg]]<br />
* [[:File:Replace this image male.svg]]<br />
* [[:File:Silver - Replace this image female.svg]]<br />
* [[:File:Silver - Replace this image male.svg]]<br />
* [[:File:Replace this image.svg]]<br />
* [[:File:Cricket no pic.png]]<br />
* [[:File:CarersLogo.gif]]<br />
* [[:File:Diagram Needed.svg]]<br />
* [[:File:Example.jpg]]<br />
* [[:File:Image placeholder.png]]<br />
* [[:File:No male portrait.svg]]<br />
* [[:File:Nocover-upload.png]]<br />
* [[:File:NoDVDcover copy.png]]<br />
* [[:File:Noribbon.svg]]<br />
| style="vertical-align:top;" |<br />
* [[:File:No portrait-BFD-test.svg]]<br />
* [[:File:Placeholder barnstar ribbon.png]]<br />
* [[:File:Project Trains no image.png]]<br />
* [[:File:Image-request.png]]<br />
* [[:File:Sin bandera.svg]]<br />
* [[:File:Sin escudo.svg]]<br />
* [[:File:Replace this image - temple.png]]<br />
* [[:File:Replace this image butterfly.png]]<br />
* [[:File:Replace this image.svg]]<br />
* [[:File:Replace this image1.svg]]<br />
* [[:File:Resolution angle.png]]<br />
* [[:File:Image-No portrait-text-BFD-test.svg]]<br />
* [[:File:Insert image here.svg]]<br />
* [[:File:No image available.png]]<br />
* [[:File:NO IMAGE YET square.png]]<br />
* [[:File:NO IMAGE YET.png]]<br />
* [[:File:No Photo Available.svg]]<br />
* [[:File:No Screenshot.svg]]<br />
* [[:File:No-image-available.jpg]]<br />
* [[:File:Null.png]]<br />
* [[:File:PictureNeeded.gif]]<br />
* [[:File:Place holder.jpg]]<br />
* [[:File:Unbenannt.JPG]]<br />
* [[:File:UploadACopyrightFreeImage.svg]]<br />
* [[:File:UploadAnImage.gif]]<br />
* [[:File:UploadAnImage.svg]]<br />
* [[:File:UploadAnImageShort.svg]]<br />
* [[:File:CarersLogo.gif]]<br />
* [[:File:Diagram Needed.svg]]<br />
* [[:File:No male portrait.svg]]<br />
* [[:File:NoDVDcover copy.png]]<br />
* [[:File:Placeholder barnstar ribbon.png]]<br />
* [[:File:Project Trains no image.png]]<br />
* [[:File:Image-request.png]]<br />
* [[:File:NoImageHere-Computers.jpg]]<br />
|}<br />
<br />
== Tracking categories ==<br />
* {{clc|Pages using deprecated image syntax}}<br />
* {{clc|Pages using infoboxes with thumbnail images}}<br />
<br />
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||<br />
{{DEFAULTSORT:Image, {{PAGENAME}}}}<br />
[[Category:Lua metamodules]]<br />
[[Category:Modules for image handling]]<br />
[[Category:Modules that add a tracking category]]<br />
}}</includeonly></div>Simon