Help:Images: Difference between revisions

From BoyWiki
No edit summary
 
(48 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Draft}}
{| style="width: 100%; margin-bottom:7px; border:1px solid #cedff2; padding:2px; background-color:#f5faff"
|- bgcolor="#cedff2"
|align="center" style="font-size:20pt; font-weight:bold; padding:5px"|Adding images to your page
|-
|}
<div style="border:2px solid #A3B1BF; padding:.5em 1em 1em 1em;  background-color:#fff; color:#000">
Only [[curator]]s can upload and make available a new image/picture.  Available images can be reviewed by [https://media.boywiki.org/wiki/Main_Page  category].
BoyWiki users may submit new images via  [mailto:Admin@boywiki.org email] or by adding a request to the [[BoyWiki:Requests for image uploads|requests for image uploads]] page, and externally hosted images may not be linked inline with article text. Any image that is contributed must conform to the base guidelines and be submitted to be licensed under the [[BoyWiki (en):Text of the GNU Free Documentation License|GNU Free Documentation License]] by the copyright holder.
==Basics==
==Basics==


Line 13: Line 23:
In this case, it is a thumbnail centered left. 1.5 determines a proportion of the original file.
In this case, it is a thumbnail centered left. 1.5 determines a proportion of the original file.


* If you want to make the most of it, there is a much more detailed explanation at : [http://www.mediawiki.org/wiki/Help:Images| Help Images on wikimedia].
===Links===
[[File:CARAGLIO Giovanni Jacopo 1530c Apollo e Giacinto 802x1042.jpg|100px|right|link=Hyacinth (mythology)]]
 
 
To link to some other page, specify its name in the link option along with an appropriate caption that hints to readers what will happen if they click on the link. This caption serves both as title text for the tooltip, and as alt text for visually disabled readers. For example, "<code><nowiki>
[[File:CARAGLIO Giovanni Jacopo 1530c Apollo e Giacinto 802x1042.jpg|100px|right|link=Hyacinth (mythology)]]</nowiki></code>" generates an image that links to the article about ''[[Hyacinth (mythology)|Hyacinth]]''.
{{clr}}
 
----
 
----
 
==Advanced==
<code><nowiki>[[File:</nowiki>'''''Name'''''|'''''Type'''''|'''''Border'''''|'''''Location'''''|'''''Alignment'''''|'''''Size'''''|link='''''Link'''''|alt='''''Alt'''''|'''''Caption'''''<nowiki>]]</nowiki></code>
 
:<small><code>Plain type</code></small> means you always type exactly what you see. <small><code>'''''Bolded italics'''''</code></small> means a variable.
 
Only '''''Name''''' is required. Most images should use "<code><nowiki>[[File:</nowiki>'''''Name'''''|thumb|alt='''''Alt'''''|'''''Caption''''']]</code>" and should not specify a size. The other details are optional and can be placed in any order.
 
 
; ''Type'' : "<code>thumb</code>" (or "<code>thumbnail</code>"; either can be followed by "<code>=<var>filename</var></code>"), "<code>frame</code>" (or "<code>framed</code>"), or "<code>frameless</code>". Displays the image with specific formatting (see below).
; ''Border'' : "<code>border</code>". Put a small border around the image.
; ''Location'' : "<code>right</code>", "<code>left</code>", "<code>center</code>" or "<code>none</code>". Determine the horizontal placement of the image on the page. This defaults to "<code>right</code>" for thumbnails and framed images.
; ''Alignment'' : "<code>baseline</code>", "<code>middle</code>", "<code>sub</code>", "<code>super</code>", "<code>text-top</code>", "<code>text-bottom</code>", "<code>top</code>", or "<code>bottom</code>". Vertically align the image with respect to adjacent text. This defaults to "<code>middle</code>".
; ''Size'' : "'''Width'''<code>px</code>" or "<code>x</code>'''Height'''<code>px</code>" or "'''Width'''<code>x</code>'''Height'''<code>px</code>" or "<code>upright</code>" or "<code>upright='''Factor'''</code>". Scale the image to be no greater than the given width or height, keeping its aspect ratio. With "<code>upright</code>", scale a thumbnail from its default size by the given factor (default 0.75), rounding the result to the nearest multiple of 10 pixels. Scaling up (i.e. stretching the image to a greater size) is disabled when the image is framed.
; ''Link'' : Link the image to a different resource, or to nothing. Must not be set for non-public domain images unless attribution is provided in some other fashion.
; ''Alt'' : Specify the [[alt attribute|alt text]] for the image.
; ''Caption'' : Specify the image's caption. This is visible only if "frame" or "thumb" attribute is used.
 
===Detailed syntax===
 
The image syntax begins with "<code><nowiki>[[</nowiki></code>", contains components separated by "<code>|</code>", and ends with "<code><nowiki>]]</nowiki></code>". The "<code><nowiki>[[</nowiki></code>" and the first "<code>|</code>" (or, if there is no "<code>|</code>", the terminating "<code><nowiki>]]</nowiki></code>") must be on the same line; other spaces and line breaks are ignored if they are next to "<code>|</code>" characters or just inside the brackets. Spaces or line breaks are not allowed just before the "<code>=</code>" in the following options, and may have undesirable side effects if they appear just after the "<code>=</code>".
 
====Type====
Zero or one of these options may be specified to control whether or not the image is scaled down and given a border.
; <code>thumb</code> : (Or '''<code>thumbnail</code>'''.) Scale the image down, and put a box around the image. Show any caption below the image. Float the image on the right unless overridden with the [[#Location|location attribute]]. If no image size is specified, use a per-user preference for logged-in users (see "Thumbnail size" under {under your user preferences[[File:30px-Redirect arrow without text.jpg|30px]] appearance [[File:30px-Redirect arrow without text.jpg|30px]] files ), defaulting to 220 pixels for non-logged-in users. May be used in conjunction with the "<code>upright</code>" option. With an operand, ''e.g.'', "<code>thumb=Example.png</code>", the operand names an image that is used as the thumbnail, ignoring any size specification.
; <code>frame</code> : Preserve the original image size, and put a box around the image. Show any caption below the image. Float the image on the right unless overridden with the location attribute. Displayed size of an image will not be scaled when "<code>frame</code>" is used.
; ''(nothing specified)'' : Preserve the original image size, and do not add a border around the image. Do not show a caption. If no alt text is specifically requested, use the requested caption as alt text.
; <code>frameless</code> : Scale the image down. Place the image inline with the text unless overridden with the location attribute. If no image size is specified, use a per-user preference for logged-in users (see "Thumbnail size" (under your user preferences[[File:30px-Redirect arrow without text.jpg|30px]] appearance [[File:30px-Redirect arrow without text.jpg|30px]] files ), defaulting to 300 pixels for non-logged-in users. May be used in conjunction with the "<code>upright</code>" option.
 
==== Border ====
; <code>border</code> : Generate a one-pixel border around the image. This has an effect only around unframed images ('none' and 'frameless'), as framed images always have borders.
 
====Location====
Zero or one of these options may be specified to control the position of the image.
; <code>right</code> : Place the image on the right side of the page. The article text that follows the image flows around the image. This is the default when <code>thumb</code> or <code>frame</code> is used.
; <code>left</code> : Place the image on the left side of the page. The article text that follows the image flows around the image.
; <code>center</code> : Place the image in the center of the page. The article text that follows the image is placed below the image.
; <code>none</code> : Place the image on the left side of the page. The article text that follows the image is placed below the image.
If none of these four options is used, and neither <code>thumb</code> nor <code>frame</code> is present, the image is placed inline with the text, [[File:Face-smile.svg|18px|alt=smile]] like this.
 
====Vertical alignment====
 
Zero or one of these options may be specified to control the vertical alignment of the image with respect to adjacent text. These options apply only to plain images, which do not cause breaks and are not floated (that is, they do not work with images that have text wrap to flow around them). To make text flow around an image, place the image preceding the text.  In the following list, each option's explanation is preceded by what ''[[:File:Flag of Albania.png]]'' looks like when aligned with that option, using the markup:
: <code><nowiki>[[File:Flag of Albania.png|</nowiki>''option''<nowiki>|8px|link=|alt=]]</nowiki></code>
 
; <code>baseline</code>: [[File:Flag of Albania.png|baseline|8px|link=|alt=]]Align the bottom of the image with the [[Baseline (typography)|baseline]] of the text.
 
; middle: [[File:Flag of Albania.png|middle|8px|link=|alt=]](This is the default.) Align the vertical middle of the image with the baseline of the text plus half the [[x-height]] of the text, so that the image is vertically centered around a lower case "x" in the text.
 
; sub: [[File:Flag of Albania.png|sub|8px|link=|alt=]]Align the bottom of the image to the same level that the bottom of a subscript would be, such as the bottom of the "2" in "X<sub>2</sub>".
 
; super: [[File:Flag of Albania.png|super|8px|link=|alt=]]Align the bottom of the image to the same level that the bottom of a superscript would be, such as the bottom of the "2" in "X<sup>2</sup>".
 
; text-top: [[File:Flag of Albania.png|text-top|8px|link=|alt=]]Align the top of the image to the top of the text. This is often a bit higher than the top of a capital letter, because of [[Ascender (typography)|ascenders]] in letters like lower-case "h".
 
; text-bottom: [[File:Flag of Albania.png|text-bottom|8px|link=|alt=]]Align the bottom of the image to the bottom of the text. This is somewhat lower than the baseline, because of [[descender]]s in letters like lower-case "y".
 
; top: [[File:Flag of Albania.png|top|8px|link=|alt=]]Align the top of the image to the top of the line containing the text. Normally this is slightly higher than the top of the text, to make space between lines of text.
 
; bottom: [[File:Flag of Albania.png|bottom|8px|link=|alt=]]Align the bottom of the image to the bottom of the line containing the text. Normally this is slightly lower than the bottom of the text.
 
====Size====
 
Any or none of these options may be specified to control the size of the image. In the case of images with captions, if the image is already smaller than the requested size, then the image retains its original size (it is not enlarged). In the case of images without captions, the image will be enlarged or reduced to match the requested size. Sizing is disabled when a 'frame' is used.
; ''Width''<code>px</code> : (''E.g.'', "<code>100px</code>".) Scale the image to make it the specified number of pixels in width, and scale the height to retain the original aspect ratio.
; <code>x</code>''Height''<code>px</code> : (''E.g.'', "<code>x150px</code>".) Scale the image to make it the specified number of pixels in height, and scale the width to retain the original aspect ratio.
; ''Width''<code>x</code>''Height''<code>px</code> : (''E.g.'', "<code>100x150px</code>".) Scale the image to be no wider and no higher than the specified number of pixels. The image will keep its original aspect ratio.
; ''(nothing specified)'' : For thumbnails, use the size specified in preferences for logged in users, and use a size determined by resolution for anonymous users. For non-thumbnails, use the native size of the image.
; <code>upright</code> : Scale a thumbnail image to 75% of normal thumbnail width, rounding the result to the nearest multiple of 10 pixels.
; <code>upright=</code>''Factor'' : Adjust a thumbnail's size to '''''Factor''''' times the default thumbnail size, rounding the result to the nearest multiple of 10. For instance, "<code>upright=1.5</code>" makes the image larger, which is useful for maps or schematics that need to be larger to be readable. The parameter "<code>upright=1</code>" returns the same size as thumbnail width, and "<code>upright=0.75</code>" is functionally identical to "<code>upright</code>" alone.  If you set ''Factor'' equal to the image's aspect ratio (width divided by height) the result is equivalent to scaling the height to be equal to the normal thumbnail width.
 
The "<code>upright</code>" option must be used along with the "<code>thumb</code>" or "<code>frameless</code>" parameter.
 
====Link====
 
Ordinarily, an image acts as a hypertext link to the [[Help:Image page|image description page]], a page with information about the image itself. Using the link option allows an image to act as a hypertext link to a different page.
; <code>link=</code>''Page'' : The image acts as a hypertext link to the specified page. Do not enclose the page name in square brackets. If '''''Page''''' is a URL, the image acts as an external link; otherwise it links to the named Wikipedia page.
; <code>link=</code> : No hyperlink is created. Clicking on the image will have no action.
The "<code>link</code>" parameter cannot be used in conjunction with "<code>thumb</code>", as "<code>thumb</code>" is always meant to link to the larger version of the image. In addition, "<code>link</code>" cannot be used with "<code>frame</code>".
 
[[File:ANKER Albert 1897 Schlafender Knabe im Heu 2660x2075.jpg|thumb|120px|right|File:File:ANKER Albert 1897 Schlafender Knabe im Heu 2660x2075.jpg rendered as a thumbnail above; [[Media:ANKER Albert 1897 Schlafender Knabe im Heu 2660x2075.jpg]] is the direct link]]
One may wish to link directly to the image file without displaying any thumbnail or preview image at all, possibly useful for downloading or viewing directly with a compatible browser. The ANKER Albert 1897 Schlafender Knabe im Heu 2660x2075.jpg‎ at the right contains '''<code><nowiki>[[Media:ANKER Albert 1897 Schlafender Knabe im Heu 2660x2075.jpg‎]]</nowiki></code>''' as such a virtual Media link in its caption.
 
====Alt text and caption====
 
Zero or more of these options may be specified to control the ''alt text'', ''link title'', and ''caption'' for the image. Captions may contain embedded wiki markup, such as links or formatting.
 
; <code>alt=</code>''Alt'' : Use '''''Alt''''' as the alt text for the image.
; ''Caption'': (any text that is not recognised as some other part of the image syntax): How this text is used depends on the image type. When the type has a visible caption ("<code>thumbnail</code>", "<code>thumb</code>", "<code>frame</code>" or "<code>framed</code>") then this text appears as a caption below the image. Otherwise, (if the image type is unspecified or is "<code>frameless</code>"), this text is used for the link title provided the link has not been suppressed with "<code>|link=</code>", and also for the alt text provided an explicit <code>alt=</code>'''''Alt''''' has not been supplied.
 
The actual alt text for the displayed image will be one of the following, in order of preference:
# The explicitly requested '''''Alt''''', if any;
# The explicitly requested '''''Caption''''', if the image type has no visible caption;
# The empty string, if there is an explicitly requested '''''Caption''''' and the image type has a visible caption.
# The image file name if there is no explicitly requested '''''Alt''''' or '''''Caption'''''. This is never a satisfactory option.


===Media.boywiki - Must-Read===
It is only possible to specify the link title text for images with no visible caption (as described above). However, as not all browsers display this text, and it is ignored by screen readers, there is little point.


In the previous example, filename.jpg must be a file hosted on [https://media.boywiki.org| media.boywiki]. It was dubbed the BoyWiki Media Repository and is a facility shared by the german, french and english versions of BoyWiki. To find out <i>what images can I upload on BoyWiki?</i> check out its [https://media.boywiki.org| main page]. To have images uploaded there, ask one of the [[Curator|curators]] or send us word at info@boywiki.org, only don't send the images yet. Also check out this [[Help:Contents#Submitting_media_for_articles| related help item]].
==How to display an image in uploaded size, with a caption==


====SSL display issue====
To display an image as uploaded with a caption use <code><nowiki>[[File:Hyacinth.jpg|frame|none|alt=Alt text|Caption text]]</nowiki></code>.


Since images used here are hosted on media.boywiki, which uses a different self-signed security certificate, they won't be displayed  on this page until you make an exception for that certificate. This is done in the process of going to media.boywiki.org (you have to add an exception). Alternatively, any of the images below is two clicks away from media.boywiki. When you're done, come back here, refresh the screen if needs be, and all images will be displayed.
[[File:Hyacinth.jpg|frame|none|alt=Alt text|Caption text]]


==How to display an image with no caption or formatting==


===Examples and counter-examples===
The old syntax for images without captions is <code><nowiki>[[File:Westminstpalace.jpg|Alt text]]</nowiki></code>. This is rendered inline, and the specified text is used as the image's ''alt'' attribute (alternate text for programs which cannot display images, such as [[screen reader]]s) and as the ''title'' attribute (supplementary text, often displayed as a tooltip when the mouse is over the image).


See [[Wikipedia:Image markup with HTML]] for an old, deprecated, way of putting a caption under the image using HTML code. Please use the new way of associating captions with images, as described on this page.


Tityre, tu patulae recubans sub tegmine fagi
See [[Wikipedia:Captions]] for discussion of appropriate caption text. See [[Wikipedia:Alternative text for images]] for discussion of appropriate alt text.
siluestrem tenui musam meditaris auena:
nos patriae finis et dulcia linquimus arua.
nos patriam fugimus: tu, Tityre, lentus in umbra
formosam resonare doces Amaryllida siluas.
[[Image:Snomanbyl.jpg|left|thumb|upright=1.5|''Snowboylove <br>Scruffylad<br>left. Text is displayed at the right of this image.<br>The top of this image is aligned with the words <i>O Meliboee</i>'']]


O Meliboee, deus nobis haec otia fecit.
===Example===
namque erit ille mihi semper deus, illius aram
[[File:Westminstpalace.jpg|Alt text]]
saepe tener nostris ab ouilibus imbuet agnus.
ille meas errare boues, ut cernis, et ipsum
ludere quae uellem calamo permisit agresti.
Non equidem inuideo, miror magis; undique totis
usque adeo turbatur agris. en, ipse capellas
protenus aeger ago; hanc etiam uix, Tityre, duco.
hic inter densas corylos modo namque gemellos,
spem gregis, a, silice in nuda conixa reliquit.
saepe malum hoc nobis, si mens non laeua fuisset,
de caelo tactas memini praedicere quercus.
sed tamen iste deus qui sit, da, Tityre, nobis.
Vrbem quam dicunt Romam, Meliboee, putaui
stultus ego huic nostrae similem, quo saepe solemus
pastores ouium teneros depellere fetus.
sic canibus catulos similes, sic matribus haedos
noram, sic paruis componere magna solebam.
uerum haec tantum alias inter caput extulit urbes
quantum lenta solent inter uiburna cupressi.
Et quae tanta fuit Romam tibi causa uidendi?
Libertas, quae sera tamen respexit inertem,
candidior postquam tondenti barba cadebat,
respexit tamen et longo post tempore uenit,
postquam nos Amaryllis habet, Galatea reliquit.
namque, fatebor enim, dum me Galatea tenebat,
nec spes libertatis erat nec cura peculi.
quamuis multa meis exiret uictima saeptis,
pinguis et ingratae premeretur caseus urbi,
non umquam grauis aere domum mihi dextra redibat.
Mirabar quid maesta deos, Amarylli, uocares,
cui pendere sua patereris in arbore poma;
Tityrus hinc aberat. ipsae te, Tityre, pinus,
ipsi te fontes, ipsa haec arbusta uocabant.
Quid facerem? neque seruitio me exire licebat
nec tam praesentis alibi cognoscere diuos.
hic illum uidi iuuenem, Meliboee, quotannis
bis senos cui nostra dies altaria fumant.
hic mihi responsum primus dedit ille petenti:
"pascite ut ante boues, pueri; summittite tauros.
Fortunate senex, ergo tua rura manebunt.
et tibi magna satis, quamuis lapis omnia nudus
limosoque palus obducat pascua iunco:
non insueta grauis temptabunt pabula fetas,
nec mala uicini pecoris contagia laedent.
fortunate senex, hic inter flumina nota
et fontis sacros frigus captabis opacum.
hinc tibi quae semper uicino ab limite saepes
Hyblaeis apibus florem depasta salicti
saepe leui somnum suadebit inire susurro:
hinc alta sub rupe canet frondator ad auras;
nec tamen interea raucae, tua cura, palumbes,
nec gemere aeria cessabit turtur ab ulmo.
Ante leues ergo pascentur in aethere cerui
et freta destituent nudos in litore piscis,
ante pererratis amborum finibus exul
aut Ararim Parthus bibet aut Germania Tigrim,
quam nostro illius labatur pectore uultus.
At nos hinc alii sitientis ibimus Afros,
pars Scythiam et rapidum cretae ueniemus Oaxen
et penitus toto diuisos orbe Britannos.
[[Image:Snomanbyl.jpg|center|thumb|upright=1.5|''Snowboylove <br>Scruffylad<br>center. There is no text on either side of the picture. It comes directly under the word <i>Britannos</i> and before the words <i>en umquam patrios</i>. Had <i>Britannos</i> been at the right hand side of the previous picture, the result would have looked messy. as in the following example '']]
en umquam patrios longo post tempore finis
pauperis et tuguri congestum cespite culmen,
post aliquot, mea regna, uidens mirabor aristas?
impius haec tam culta noualia miles habebit,
barbarus has segetes: en quo discordia ciuis
produxit miseros: his nos conseuimus agros!
insere nunc, Meliboee, piros, pone ordine uitis.
ite meae, quondam felix pecus, ite capellae.
non ego uos posthac uiridi proiectus in antro
dumosa pendere procul de rupe uidebo;
carmina nulla canam; non me pascente, capellae,
[[Image:Snomanbyl.jpg|right|thumb|upright=1.5|''Snowboylove <br>Scruffylad<br>right. Text is supposed to be displayed at the left, only in this case the text is pushed away by the centered image.'']]
florentem cytisum et salices carpetis amaras.
Hic tamen hanc mecum poteras requiescere noctem
fronde super uiridi: sunt nobis mitia poma,
[[Image:Snomanbyl.jpg|center|thumb|upright=1.5|''Snowboylove <br>Scruffylad<br>Center. The image is under the word <i>poma</i>, which is at the left of the former image. The result looks messy.'']]
castaneae molles et pressi copia lactis,
et iam summa procul uillarum culmina fumant,
maioresque cadunt altis de montibus umbrae.


Sicelides Musae, paulo maiora canamus!
==New syntax for images==
non omnis arbusta iuuant humilesque myricae
si canimus siluas, siluae sint consule dignae.
Vltima Cymaei uenit iam carminis aetas;
magnus ab integro saeclorum nascitur ordo.
iam redit et Virgo, redeunt Saturnia regna,
iam noua progenies caelo demittitur alto.
tu modo nascenti puero, quo ferrea primum
desinet ac toto surget gens aurea mundo,
casta faue Lucina: tuus iam regnat Apollo.
teque adeo decus hoc aeui, te consule, inibit,
Pollio, et incipient magni procedere menses;
te duce, si qua manent sceleris uestigia nostri,
irrita perpetua soluent formidine terras.
[[Image:Snomanbyl.jpg|right|thumb|upright=1.5|''Snowboylove <br>Scruffylad<br>right. Text is displayed at the left'.<b>The top of this image is aligned with the words<i>ille deum uitam</i>']]
ille deum uitam accipiet diuisque uidebit
permixtos heroas et ipse uidebitur illis,
pacatumque reget patriis uirtutibus orbem.
At tibi prima, puer, nullo munuscula cultu
errantis hederas passim cum baccare tellus
mixtaque ridenti colocasia fundet acantho.
ipsae lacte domum referent distenta capellae
ubera, nec magnos metuent armenta leones;
ipsa tibi blandos fundent cunabula flores.
occidet et serpens, et fallax herba ueneni
occidet; Assyrium uulgo nascetur amomum.
at simul heroum laudes et facta parentis
iam legere et quae sit poteris cognoscere uirtus,
molli paulatim flauescet campus arista,
incultisque rubens pendebit sentibus uua,
et durae quercus sudabunt roscida mella.
pauca tamen suberunt priscae uestigia fraudis,
quae temptare Thetin ratibus, quae cingere muris
oppida, quae iubeant telluri infindere sulcos.
alter erit tum Tiphys, et altera quae uehat Argo
delectos heroas; erunt etiam altera bella
atque iterum ad Troiam magnus mittetur Achilles.
hinc, ubi iam firmata uirum te fecerit aetas,
cedet et ipse mari uector, nec nautica pinus
mutabit merces: omnis feret omnia tellus.
non rastros patietur humus, non uinea falcem;
robustus quoque iam tauris iuga soluet arator;
nec uarios discet mentiri lana colores,
ipse sed in pratis aries iam suaue rubenti
murice, iam croceo mutabit uellera luto;
sponte sua sandyx pascentis uestiet agnos.
"Talia saecla" suis dixerunt "currite" fusis
concordes stabili fatorum numine Parcae.
adgredere o magnos (aderit iam tempus) honores,
cara deum suboles, magnum Iouis incrementum!
aspice conuexo nutantem pondere mundum,
terrasque tractusque maris caelumque profundum.
aspice uenturo laetentur ut omnia saeclo!
o mihi tum longae maneat pars ultima uitae,
spiritus et quantum sat erit tua dicere facta:
non me carminibus uincet nec Thracius Orpheus,
nec Linus, huic mater quamuis atque huic pater adsit,
Orphei Calliopea, Lino formosus Apollo.
Pan etiam, Arcadia mecum si iudice certet,
Pan etiam Arcadia dicat se iudice uictum.
incipe, parue puer, risu cognoscere matrem
(matri longa decem tulerunt fastidia menses)
incipe, parue puer: quoi non risere parentes,
nec deus hunc mensa, dea nec dignata cubilist.


Young Corydon, th’unhappy Shepherd Swain
[[File:Face-smile.png|thumb|100px|left|alt=A large clock tower and other buildings line a great river.|Face-smile.png]]
The fair Alexis lov’d, but lov’d in vain:
And underneath the Beechen Shade, alone,
Thus to the Woods and Mountains made his moan.
Is this, unkind Alexis, my reward,
And must I die unpitied, and unheard?
Now the green Lizard in the Grove is laid,
The Sheep enjoy the coolness of the Shade;
And Thestilis wild Thime and Garlike beats
For Harvest Hinds, o’erspent with Toyle and Heats:
While in the scorching Sun I trace in vain
Thy flying footsteps o’re the burning Plain.
The creaking Locusts with my Voice conspire,
They fry’d with Heat, and I with fierce Desire.
How much more easie was it to sustain
Proud Amarillis, and her haughty Reign,
The Scorns of Young Menalcus, once my care
Tho’ he were black, and thou art Heav’nly fair.
Trust not too much to that enchanting Face;
Beauty’s a Charm, but soon the Charm will pass:
White Lillies lie neglected on the Plain,
While dusky Hyacinths for use remain.
My Passion is thy Scorn; nor wilt thou know
What Wealth I have, what Gifts I can bestow:
What Stores my Dairies and my Folds contain;
A thousand Lambs that wander on the Plain:
New Milk that all the Winter never fails,
And all the Summer overflows the Pails:
Amphion sung not sweeter to his Herd,
When summon’d Stones the Theban Turrets rear’d.
Nor am I so deform’d; for late I stood
Upon the Margin of the briny Flood:
The Winds were still, and if the Glass be True,
With Daphnis I may vie, tho’ judg’d by you.
O leave the noisie Town, O come and see
Our Country Cotts, and live content with me!
To wound the Flying Deer, and from their Cotes
With me to drive a-Field, the browzing Goats:
To pipe and sing, and in our Country Strain
To copy, or perhaps contend with Pan.
Pan taught to joyn with Wax unequal Reeds,
Pan loves the Shepherds, and their Flocks he feeds.
Nor scorn the Pipe; Amnytas, to be taught,
With all his Kisses should my Skill have bought.
Of seven smooth joints a mellow Pipe I have,
Which with his dying breath Damaetas gave:
And said, This, Corydon, I leave to thee;
For only thou deserv’st it after me.
His Eyes Amyntas durst not upward lift,
For much he grudg’d the Praise, but more the Gift.
Besides two Kids that in the Valley stray’d,
I found by chance and to my Fold convey’d.
They drein two bagging Udders every day;
And these shall be Companions of thy Play.
Both fleck’d with white, the true Arcadian Strain,
Which Thestilis had often beg’d in vain:
And she shall have them, if again she sues,
Since you the Giver and the Gift refuse.
Come to my longing Arms, my lovely care,[[Image:Snomanbyl.jpg|right|thumb|upright=1.5|''Snowboylove <br>Scruffylad<br>right. The top of this  box is aligned on the words <i>Come to my longing arms</i>. It is somewhat too tall to be put so low in a chapter, and is displayed astride this and the next one. It can cause confusion as to what part of the text it is meant to illustrate.']]
And take the Presents which the Nymphs prepare.
White Lillies in full Canisters they bring,
With all the Glories of the Purple Spring:
The Daughters of the Flood have search’d the Mead
For Violets pale, and cropt the Poppy’s Head:
For Short Narcissus and fair Daffodil,


====See? This image is astride two chapters====
The new syntax is backward compatible, so articles don't have to be changed.
In the syntax <code><nowiki>[[</nowiki>File:''filename''|''options''<nowiki>]]</nowiki></code> (''e.g.'', <code><nowiki>[[File:Face-smile.png|thumb|100px|left|alt=A large clock tower and other buildings line a great river.|The Palace of Westminster]]</nowiki></code> shown in the left), several options can be set when including an image. Those affect the placing of the image, its size or the way the image will be presented. The options are <code>right</code>, <code>left</code>, <code>center</code>, <code>none</code>, <code>''size''px</code>, <code>thumbnail</code> (<code>thumb</code>), <code>frame</code>, and <code>''alternate (caption) text''</code>.{{clr}}


Pancies to please the Sight, and Cassia sweet to smell:
[[File:Face-smile.png|thumb|alt=A large clock tower and other buildings line a great river.|Face-smile.png|200px|right|face smiling]]
And set soft Hyacinths with Iron blue,
* The options can be combined, and vertical bars ("|") are used to separate options from each other.
To shade marsh Marigolds of shining Hue.
* Do not put spaces around the vertical bars for readability &ndash; options will not be interpreted correctly.
Some bound in Order, others loosely strow’d,
* The options can be put in any order.
To dress thy Bow’r, and trim thy new Abode.
* An unknown option is taken as the caption text, but this will appear only if <code>thumbnail</code> or <code>frame</code> are specified.
My self will search our planted Grounds at home,
* If there are two or more unknown options, the last one upstages the rest: <code><nowiki>[[Face-smile.png|thumb|alt=Face-smile.png.|Face-smile.png|200px|right|Face-smile.png]]</nowiki></code> (shown on the right).{{clr}}
For downy Peaches and the glossie Plum:
And thrash the Chesnuts in the Neighb’ring Grove,
Such as my Amarillis used to love.
The Laurel and the Myrtle sweets agree;
And both in Nosegays shall be bound for thee.
Ah, Corydon, ah poor unhappy Swain,
Alexis will thy homely Gifts disdain:
Nor, shoulds’t thou offer all thy little Store,
Will rich Iolas yield, but offer more.
What have I done, to name that wealthy Swain,
So powerful are his Presents, mine so mean!
The Boar amid my Crystal Streams I bring;
And Southern Winds to blast my flow’ry Spring.
Ah, cruel Creature, whom dost thou despise?
The Gods to live in Woods have left the Skies.
And Godlike Paris in th’ Idean Grove,
To Priam’s Wealth prefer’d Oenone’s Love.
In Cities which she built, let Pallas Reign;
Tow’rs are for Gods, but Forrests for the Swain.
The greedy Lyoness the Wolf pursues,
The Wolf the Kid, the wanton Kid the Bowze:
Alexis thou are chas’d by Corydon;
All follow sev’ral Games, and each his own.
See from afar the Fields no longer smoke,
The sweating Steers unharnass’d from the Yoke,
Bring, as in Triumph, back the crooked Plough;
The Shadows lengthen as the Sun goes Low.
Cool Breezes now the raging Heats remove;
Ah, cruel Heaven! that made no Cure for Love!
I wish for balmy Sleep, but wish in vain:
Love has no bounds in Pleasure, or in Pain.
What frenzy, Shepherd, has thy Soul possess’d,
Thy Vinyard lies half prun’d, and half undress’d.
Quench, Corydon, thy long unanswered fire:
Mind what the common wants of Life require.
On willow Twigs employ thy weaving care:
And find an easier Love, tho’ not so fair.


Here is the description of the options other than the caption text:


==Gallery==
===right===
[[File:Face-smile.png|right|70px|alt=A large clock tower and other buildings line a great river.]]The image is right-aligned, and text floats to the left of the image: <code><nowiki>[[File:Face-smile.png|right|70px|alt=Face-smile.png.]]</nowiki></code> (shown on the right).{{clr}}<hr>


A group of images can be displayed as a gallery. This example copied from the french BoyWiki is [https://fr.boywiki.org/wiki/Le_livre_sans_titre_d%C3%A9di%C3%A9_aux_jeunes_gens_et_aux_p%C3%A8res_et_m%C3%A8res_de_famille|Le livre sans titre dédié aux jeunes gens et aux pères et mères de famille] (Paris, 1830), a pamphlet warning teenagers and their parents against the inevitable consequences of masturbation.
===left===
[[File:Face-smile.png|left|70px|alt=A large clock tower and other buildings line a great river.]]The image is left aligned, and text floats to the right of the image: <code><nowiki>[[File:Face-smile.png|left|70px|alt=A large clock tower and other buildings line a great river.]]</nowiki></code> (shown on the left).{{clr}}<hr>


===center===
The image is centered, and... [[File:Face-smile.png|center|70px|alt=A large clock tower and other buildings line a great river.]] the text following the image starts below it: <code><nowiki>[[File:Face-smile.png|center|70px|alt=A large clock tower and other buildings line a great river.]]</nowiki></code> (shown above).{{clr}}<hr>


Check out the Edit or View Source tabs for the following example's wikicode.
===none===


The image is put at the left, and... [[File:Face-smile.png|none|70px|alt=A large clock tower and other buildings line a great river.]] the text following does not float to the right (or to the left, obviously), and starts below it: <code><nowiki>[[File:Face-smile.png|none|70px|alt=A large clock tower and other buildings line a great river.]]</nowiki></code> (shown above).{{clr}}<hr/>


{| style="width: 75%; height: 200px" border="1"
:: '''Notes:'''{{clr}}
::[[File:Face-smile.png|center|left|none|right|70px|alt=A large clock tower and other buildings line a great river.]] The four options below (center, left, none, and right) are incompatible. When used combined, the first one overrides the rest: <code><nowiki>[[File:Face-smile.png|center|left|none|right|70px|alt=A large clock tower and other buildings line a great river.]]</nowiki></code> (shown in the center).{{clr}}
 
::[[File:Face-smile.png|70px|alt=A large clock tower and other buildings line a great river.|right]] What is between the last vertical bar and the closing brackets ("]]"), void or not, is taken as the last option, and works as usual. For instance, when the last option is <code>right</code>, the image is right-aligned, and text floats to the left: <code><nowiki>[[File:Face-smile.png|70px|alt=A large clock tower and other buildings line a great river.|right]]</nowiki></code> (shown on the right).{{clr}}
 
::[[File:Face-smile.png|thumb|alt=A large clock tower and other buildings line a great river.|This text is not displayed.|70px|left|]][[File:Face-smile.png|thumb|alt=A large clock tower and other buildings line a great river.|This text is displayed.|70px|right]] In particular, if the last option is the void text (that is, if there is nothing between the last vertical bar and the closing brackets), the caption is not displayed: <code><nowiki>[[File:Westminstpalace.jpg|thumb|alt=A large clock tower and other buildings line a great river.|This text is not displayed.|70px|left|]]</nowiki></code> (shown on the left) and <code><nowiki>[[File:Face-smile.png|thumb|alt=A large clock tower and other buildings line a great river.|This text is displayed.|70px|right]]</nowiki></code> (shown on the right).{{clr}}
 
::[[File:Face-smile.png|70px|right]][[File:Westminstpalace.jpg|70px|right]][[File:Face-smile.png|70px|left]]There is in HTML/CSS a floating issue that prevents certain images (or other multimedia objects) from floating above others.  It occurs only if:
:::::*there are multiple multimedia objects on one side of the page
:::::*the multimedia object on the other side of the page comes '''after''' the other ones in the source code
:::::The first multimedia object on the latter side of the page won't float above the last multimedia object on the former (see images on left and right).  To get around it, you have to alternate between left and right in aligning images or other multimedia objects (see below) or, when that's not possible, set to "none" the alignment of the one that won't float above the others (see the population table [[Rochefort, Charente-Maritime|here]] for an example).{{clr}}
 
 
::[[File:Face-smile.png|70px|right]][[File:Face-smile.png|70px|left]][[File:Westminstpalace.jpg|70px|right]]{{clr}}
 
; <code>''size''px</code> : [[File:Face-smile.png|right|50px|alt=A large clock tower and other buildings line a great river.]] This option renders a version of the image that's ''[size]'' pixels wide (''e.g.'', <code><nowiki>[[File:Face-smile.png|right|50px|alt=A large clock tower and other buildings line a great river.]]</nowiki></code> shown on the right). Height is computed to keep the ratio (i.e. the shape of the image).{{clr}}
 
:: '''Notes:'''{{clr}}
::Specifying a size does not just change the apparent image size using HTML; it actually generates a resized version of the image on the fly and links to it appropriately. This happens whether or not you specify the size in conjunction with "<code>thumb</code>".''
 
::This means the server does all the work of changing the image size, not the web browser of the user. By having the server do all the work means faster downloading of pages. It also means that larger images can be stored on the server without any slowdown by the browser (especially on dial up telephone lines). Only the data for the actual size on the page is transmitted.
 
::An exception is animated GIF images. Animated GIF images are not processed by the server. When a smaller size is specified the original full sized animated GIF image is served. Whether the animated GIF image is subsequently scaled to fit the allotted space belongs to the capabilities of the receiving browser. Resizing an animated GIF image will significantly reduce its quality, without any reduction of download time.
 
::From [[m:MediaWiki 1.5|MediaWiki 1.5]] the default thumbnail width can be set in the preferences, so it is recommended ''not'' to specify "px", in order to respect the users' preferences (unless, for a special reason, a specific size is required regardless of preferences, or a size is specified outside the range of widths 120–300 pixels that can be set in the preferences).
 
:: If you specify a "frame" option the image will not be scaled, and no size specifiers will be in the HTML. The image will be rendered at full size.{{clr}}
 
:: [[File:Face-smile.png|right|50px|80px|alt=A large clock tower and other buildings line a great river.]] When there are two or more "size" options, only the last one is valid: <code><nowiki>[[File:Face-smile.png|right|50px|80px|alt=File:Face-smile.pngr.]]</nowiki></code> (shown on the right).{{clr}}
 
; <code>thumbnail</code>, <code>thumb</code> : [[File:Face-smile.png|left|100px|alt=A large clock tower and other buildings line a great river.]] [[File:Face-smile.png|thumb|alt=A large clock tower and other buildings line a great river.|File:Face-smile.png]] The <code>thumbnail</code> (<code>thumb</code>) option generates an image. It is automatically resized when the "size" attribute is not specified. Without the options <code>left</code>, <code>center</code>, and <code>none</code>, the image is normally on the right. If the image has a caption text, it is displayed in the lower margin. ''E.g.'', <code><nowiki>[[File:Face-smile.png|thumbnail|left|100px|alt=File:Face-smile.png]]</nowiki></code> (shown on the left) and <code><nowiki>[[File:Face-smile.png|thumb|alt=File:Face-smile.png|File:Face-smile.png]]</nowiki></code> (shown on the right). ''Note: thumbnail (thumb) cannot be used in lists.''
{{clr}}
 
<!-- The following paragraph is supposed to show how one can display a 10 by 10 pixel image as 100 by 100, and that clicking on "enlarge" actually shows it smaller (in the original size). But it doesn't seem to work — the image is displayed 10 by 10. -->
[[File:tst.png|right|thumb|100px|alt=Tiny globe|This is a globe, and take a look at it in [[Media:tst.png|the actual size]].]] An "enlarge" icon is put also in the lower margin of the thumbnail. Both the image itself and the icon link to the image description page with the image in its actual size. The icon shows the link title "Enlarge" in its hoverbox, even in cases where this term does not apply, because it leads from the enlarged image to the one with the actual size. ''E.g.'', <code><nowiki>[[File:tst.png|right|thumb|100px|alt=Tiny globe|This is a globe, and take a look at it in [[Media:tst.png|the actual size]].]]</nowiki></code> (shown on the right).{{clr}}
 
; <code>upright</code> : [[File:Face-smile.png|thumbnail|upright|left|alt=File:Face-smile.png|The "<code>upright</code>" option is about 75% of thumbnail width.]] [[File:Westminstpalace.jpg|thumb|upright=1.5|right|alt=File:Face-smile.png|The "<code>upright=1.5</code>" option]] The <code>upright</code> option works in combination with the <code>thumbnail</code> or <code>thumb</code> option to resize an image to about 75% of the width of a plain <code>thumbnail</code>. The <code>upright</code> option scales larger or smaller in step with user screen resolution. The relative size can be determined with a multiplier such as <code>upright=''x''</code>. If ''x''=1 then the image is standard thumbnail width. ''E.g.'', <code><nowiki>[[File:Face-smile.pngg|thumbnail|upright|left|alt=A large clock tower and other buildings line a great river.|The "<code>upright</code>" option is about 75% of thumbnail width.]]</nowiki></code> (shown on the left) and <code><nowiki>[[File:Face-smile.png|thumb|upright=1.5|right|alt=A large clock tower and other buildings line a great river.|The "<code>upright=1.5</code>" option]]</nowiki></code> (shown on the right).
{{clr}}
 
; <code>frame</code> : [[File:Face-smile.png|frame|thumbnail|50px|alt=A large clock tower and other buildings line a great river.|The Palace of Westminster]] With this option, the embedded image is shown with its actual size enclosed by a frame, regardless of the "thumb" or "size" attribute, and the caption, if any, is visible in the frame. Without the options <code>left</code>, <code>center</code>, and <code>none</code>, the image is normally on the right: <code><nowiki>[[File:Face-smile.png|frame|thumbnail|50px|alt=A large clock tower and other buildings line a great river.|The Palace of Westminster]]</nowiki></code>.{{clr}}
 
With none of the options other than <code>''size''px</code> and <code>''alternate (caption) text''</code>, an embedded image is rendered inline.
 
<pre style="overflow:auto;">
text text text text text text
<nowiki>[[File:Face-smile.png|150px|alt=A large clock tower and other buildings line a great river.|The Palace of Westminster]]</nowiki>
text text text text text
<nowiki>[[File:tst.png|100px|alt=Tiny globe|This is a globe.]]</nowiki>
text text text text
</pre>
 
gives
 
text text text text text text
[[File:Face-smile.png|150px|alt=A large clock tower and other buildings line a great river.|The Palace of Westminster]]
text text text text text
[[File:tst.png|100px|alt=Tiny globe|This is a globe.]]
text text text text
 
The option <code>none</code> can be used to have thumbnails without left- or right-alignment. This is probably most useful for [[Wikipedia:How to use tables|tables]]. This is an example:
 
{| class="wikitable"
!colspan=3| How to use <code>none</code>
|-
|-
| [[Image:Anonyme-livreantimasturbation-1830-02.jpg|right|thumb|upright=1.5|He was a young, handsome boy, his mother's hope.]] || [[Image:Anonyme-livreantimasturbation-1830-03.jpg|right|thumb|upright=1.5|He corrupted himself. Soon he had to carry the burden of his guilt. He was old before his time. His back was bent.]] || [[Image:Anonyme-livreantimasturbation-1830-04.jpg|right|thumb|upright=1.5|A fire devours his guts. He has terrible stomach aches.]]
!colspan=3| London's palaces
|- style="height: 100px;"
| [[Image:Anonyme-livreantimasturbation-1830-05.jpg|right|thumb|upright=1.5|Not so long ago, his eyes were pure and bright. Not they are lit off, as if a stripe of fire circled them round.]] || style="width: 200px;" | [[Image:Anonyme-livreantimasturbation-1830-06.jpg|right|thumb|upright=1.5|He can't walk anymore. His legs fail him.]] || [[Image:Anonyme-livreantimasturbation-1830-07.jpg|right|thumb|upright=1.5|Terrible dreams are the cause of restless nights. He can't find sleep anymore.]]
|-
|-
| [[Image:Anonyme-livreantimasturbation-1830-08.jpg|right|thumb|upright=1.5|His teeth are now rotting and falling off.]] || [[Image:Anonyme-livreantimasturbation-1830-09.jpg|right|thumb|upright=1.5|His chest is inflammated. He spits out blood.]] || [[Image:Anonyme-livreantimasturbation-1830-10.jpg|right|thumb|upright=1.5|His hair, once so fair, fall off as if he were an old man. He is balding before his time.]]
| Palace of Westminster || [[File:Westminstpalace.jpg|thumb|none|100px|alt=A large clock tower and other buildings line a great river.|From the Thames]] || <code><nowiki>[[File:Westminstpalace.jpg|thumb|none|100px|alt=A large clock tower and other buildings line a great river.|From the Thames]]</nowiki></code>
|-
|-
| [[Image:Anonyme-livreantimasturbation-1830-11.jpg|right|thumb|upright=1.5|He is hungry. He wants to appease his hunger, but no food will remain his stomach.]] || [[Image:Anonyme-livreantimasturbation-1830-12.jpg|right|thumb|upright=1.5|His chest has fallen down. He vomits blood.]] || [[Image:Anonyme-livreantimasturbation-1830-13.jpg|right|thumb|upright=1.5|He has spots all over his body. He offers a terrible sight.]]
| Buckingham Palace || [[File:Buckingham Palace 2003.jpg|thumb|none|100px|alt=Grand city building below beautiful blue sky and clouds|Queen's home]] || <code><nowiki>[[File:Buckingham palace Copyright2003KaihsuTai.jpg|thumb|none|100px|alt=Grand city building below beautiful blue sky and clouds|Queen's home]]</nowiki></code>
|}
 
==Thumbnail with caption text underneath that has one or more links==
 
From MediaWiki 1.3, it is also possible to include links in the caption text, ''e.g.'':
 
: <code><nowiki>[[File:Westminstpalace.jpg|right|thumbnail|alt=A large clock tower and other buildings line a great river.|This is the [[Palace of Westminster]] in London]]</nowiki></code>
 
[[File:Westminstpalace.jpg|right|thumbnail|alt=A large clock tower and other buildings line a great river.|This is the [[Palace of Westminster]] in London]]


|-
<br style="clear:both;"/>
| [[Image:Anonyme-livreantimasturbation-1830-14.jpg|right|thumb|upright=1.5|A fever slowly consumes him. He is languishing. His body is burning.]] || [[Image:Anonyme-livreantimasturbation-1830-15.jpg|right|thumb|upright=1.5|His body stiffens. He cannot move his arms and legs anymore.]] || [[Image:Anonyme-livreantimasturbation-1830-16.jpg|right|thumb|upright=1.5|He is delirious. His body is stiffening against death, but death is stonger.]]
 
Just make sure the number of opening and closing square brackets are right. One extra or missing would mean the entire image syntax line would not work.
 
==Additional caption formatting options==
 
Additional caption formatting options are possible.
 
<source lang="html">[[File:Westminstpalace.jpg|right|thumbnail|alt=A large clock tower and other buildings line a great river.|<div align="center">This is <span style="color: green">the </span><br /> [[Palace of Westminster]]<br /> '''in <span style="color: red">London</span>'''</div>]]
</source>
 
[[File:Westminstpalace.jpg|right|thumbnail|alt=A large clock tower and other buildings line a great river.|<div align="center">This is <span style="color: green">the </span><br /> [[Palace of Westminster]]<br /> '''in <span style="color: red">London</span>'''</div>]]
 
<br clear="right" />
All of the normal text formatting options work.
 
==Overlaying annotations on an image ==
In some cases, it may be desirable to add clickable annotations to an image.  The templates [[Template:Annotated image]] and [[Template:Annotated image 4]] exist for this purpose.
 
These templates allow [[wikitext]] (e.g., regular text, wikilinks, allowed html code, references, and other templates) to be included on the image itself.  They may also be used to crop an image so as to focus on a particular portion of it, or alternatively, expand the white area around an image for better placement of wikitext.
<center>
{|
|+ Annotated image template examples
|{{Annotated image | float=none | caption=Example of an annotated diagram (using [[Template:Annotated image]]) that has clickable wikilinks and overlaid text | image=Wiwaxia body zones.png | width=300 | height=110| image-width=150 | image-left=93 | image-top=0
| annotations =
{{Annotation|88|25|[[Spine]]}}
{{Annotation|150|37|Dorsal}}
{{Annotation|58|60|Upper lateral}}
{{Annotation|204|70|Lower lateral}}
{{Annotation|58|79|Ventro-lateral}}
{{Annotation|173|96|<span style{{=}}"background-color:#753a00">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> {{=}} Frontal}}
}}
|{{Annotated image 4 | align=center | caption=Example of an annotated diagram (using [[Template:Annotated image 4]]) that has clickable wikilinks and overlaid text | image=Wiwaxia body zones.png | width=300 | height=116| image-width=150 | image-left=93 | image-top=0
| annotations =
{{Annotation|88|25|[[Spine]]}}
{{Annotation|150|37|Dorsal}}
{{Annotation|58|60|Upper lateral}}
{{Annotation|204|70|Lower lateral}}
{{Annotation|58|79|Ventro-lateral}}
{{Annotation|173|96|<span style{{=}}"background-color:#753a00">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span> {{=}} Frontal}}
}}
|[[File:Wiwaxia body zones.png|The image and caption as a thumb, sans annotations|thumb|left]]
|}</center><!--
-->
== Compatibility considerations ==
 
The floating options ''left'', ''center'', and ''right'' explained above are supported by modern browsers, but don't work with older browsers. If necessary it's simple to get a floating effect also for old browsers:
 
{| align="right"
| [[File:Westminstpalace.jpg|160px|alt=A large clock tower and other buildings line a great river.|Example]]
|}
 
<pre style="overflow:auto;">
{| align="right"
| [[File:Westminstpalace.jpg|160px|alt=A large clock tower and other buildings line a great river.|Example]]
|}</pre>
 
This code is not intended for general use, however. There are few, if any, instances where support for such legacy browsers is necessary.
 
==Cancelling floating-around-image mode==<!-- This section is linked from [[George Fox]] -->
 
After having had an image floating next to text, putting further text below it and again using the full width can be done with the following markup. This blocks an image from appearing next to the material following this markup, possibly due to [[aesthetics|aesthetic]] reasons or a change in topics.
 
: <code><nowiki><br style="clear:both" /></nowiki></code>
 
For legacy <code>align="right"</code> (etc.) floating this isn't good enough; legacy browsers would ignore inline CSS. To cancel floating under all conditions the following markup (valid XHTML 1.0 transitional) works:
 
: <code><nowiki><br clear="all" /></nowiki></code>
 
The same code can be issued by using template {{tl|clear}} or {{tl|Clr}} or {{tl|-}} in certain namespaces (<em>en</em>, <em>meta</em>).
 
==Linking to the image without displaying it==
If you don't want to show or display the image but rather just want to make a link to the description page for an image, use a leading colon before "File:" in an intra-wiki link, like this: <code><nowiki>[[:File:STS-32 crew.jpg|STS-32 crew]]</nowiki></code> which yields: [[:File:STS-32 crew.jpg|STS-32 crew]].
 
==Images that link somewhere other than the image description page==
{{see also|Wikipedia:Images linking to articles}}
 
It is possible to make an image that links to a different page instead of to the image description page. This should be done conscious of the image's licensing terms and can be achieved by using the "<code>|[[WP:PIC#link|link]]=</code>" option. To disable the link altogether and have a [[Wikipedia:ALT#Purely decorative images|purely decorative image]], in the sense that the image is not shown to visually impaired readers, use "{{para|link}}{{para|alt}}", with no arguments for either parameter.
 
==Multimedia syntax==
 
The extended syntax, in addition to yet more syntax, can also be applied to sound and video files. In these examples, ''File:'', the namespace equivalent to ''Image:'', is used. Either namespace can be used.
 
 
'''More syntax for videos'''
;Hopefully videos will be coming soon to BoyWiki.
 
; ''Initial still image'' : "<code>thumbtime='''Time'''</code>". Use the frame from the video at the given time as the initial still image. '''Time''' is either a number of seconds, or hours, minutes and seconds separated by colons. Without a thumbtime parameter, a frame from the midpoint of the video is used by default. For instance, using the same video file as previously:
{|
|valign="top"|[[File:Cat.mp4|thumb|thumbtime=21|Man in suit tie and hat at 21 seconds. Time syntax using seconds only: "21".]]
|valign="top"|[[File:Cat.mp4|thumb|thumbtime=0:23|Monoplane seen at 23 seconds. Time syntax using minutes and seconds: "0:23".]]
|valign="top"|[[File:Cat.mp4|thumb|thumbtime=0:0:33|Landed biplane seen at 33 seconds. Time syntax using hours, minutes and seconds: "0:0:33".]]
|}
 
'''Displaying small videos larger'''
 
To display a video larger than its uploaded size use "'''<code>|thumb</code>'''" and "'''<code>|''number''px</code>'''". This may be useful if the original video is very small but shows some important but small detail, but note that upscaling may create unexpected scaling artifacts. For example, the code
 
<code><nowiki>[[File:cal16x16check_vdnocnoafr1len2.avi.q10.ogv|inline|left]] [[File:cal16x16check_vdnocnoafr1len2.avi.q10.ogv|right|thumb|128px]]</nowiki></code>


|-
displays the 16 pixels wide video at its original size on the left and eight times wider at the right (the squares should be all black or all white and the edges should be sharp — any blurriness or off-white colour is likely due to the browser or the Wikimedia server rendering):
| [[Image:Anonyme-livreantimasturbation-1830-17.jpg|right|thumb|upright=1.5|At age seventeen, he draws his last breath in terrible sufferings]] ||  ||
{|align="center" width="80%"
|[[File:cal16x16check_vdnocnoafr1len2.avi.q10.ogv|inline|left]] [[File:cal16x16check_vdnocnoafr1len2.avi.q10.ogv|right|thumb|128px]]
|}
|}
'''Thumbtime in a gallery'''
The ''thumbtime'' parameter can also be used inside a gallery (either with [[Help:Gallery tag|&#60;gallery> tags]] or the {{tl|Gallery}} template):
<gallery>
File:First flights in aviation history.ogg|thumbtime=21|Man in suit tie and hat at 21 seconds.
File:First flights in aviation history.ogg|thumbtime=0:23|Monoplane seen at 23 seconds.
</gallery>
Here is the wikicode that created it:
<pre><gallery>
File:First flights in aviation history.ogg|thumbtime=21|Man in suit tie and hat at 21 seconds.
File:First flights in aviation history.ogg|thumbtime=0:23|Monoplane seen at 23 seconds.
</gallery></pre>
==See also==
*[https://en.wikipedia.org/wiki/Wikipedia:Extended_image_syntax Wikipedia:Extended image syntax]
</div>
{{Navbox Help pages|collapsed}}
[[Category:Help|Help]]

Latest revision as of 21:49, 7 December 2015

Adding images to your page

Only curators can upload and make available a new image/picture. Available images can be reviewed by category.

BoyWiki users may submit new images via email or by adding a request to the requests for image uploads page, and externally hosted images may not be linked inline with article text. Any image that is contributed must conform to the base guidelines and be submitted to be licensed under the GNU Free Documentation License by the copyright holder.

Basics

Basic wikicode

The basic wikicode is:

  • [[Image:filename.jpg]]

This would show the raw file

  • [[Image:filename.jpg|left|thumb|upright=1.5|''Comment on the image'']]

In this case, it is a thumbnail centered left. 1.5 determines a proportion of the original file.

Links


To link to some other page, specify its name in the link option along with an appropriate caption that hints to readers what will happen if they click on the link. This caption serves both as title text for the tooltip, and as alt text for visually disabled readers. For example, " [[File:CARAGLIO Giovanni Jacopo 1530c Apollo e Giacinto 802x1042.jpg|100px|right|link=Hyacinth (mythology)]]" generates an image that links to the article about Hyacinth.



Advanced

[[File:Name|Type|Border|Location|Alignment|Size|link=Link|alt=Alt|Caption]]

Plain type means you always type exactly what you see. Bolded italics means a variable.

Only Name is required. Most images should use "[[File:Name|thumb|alt=Alt|Caption]]" and should not specify a size. The other details are optional and can be placed in any order.


Type
"thumb" (or "thumbnail"; either can be followed by "=filename"), "frame" (or "framed"), or "frameless". Displays the image with specific formatting (see below).
Border
"border". Put a small border around the image.
Location
"right", "left", "center" or "none". Determine the horizontal placement of the image on the page. This defaults to "right" for thumbnails and framed images.
Alignment
"baseline", "middle", "sub", "super", "text-top", "text-bottom", "top", or "bottom". Vertically align the image with respect to adjacent text. This defaults to "middle".
Size
"Widthpx" or "xHeightpx" or "WidthxHeightpx" or "upright" or "upright=Factor". Scale the image to be no greater than the given width or height, keeping its aspect ratio. With "upright", scale a thumbnail from its default size by the given factor (default 0.75), rounding the result to the nearest multiple of 10 pixels. Scaling up (i.e. stretching the image to a greater size) is disabled when the image is framed.
Link
Link the image to a different resource, or to nothing. Must not be set for non-public domain images unless attribution is provided in some other fashion.
Alt
Specify the alt text for the image.
Caption
Specify the image's caption. This is visible only if "frame" or "thumb" attribute is used.

Detailed syntax

The image syntax begins with "[[", contains components separated by "|", and ends with "]]". The "[[" and the first "|" (or, if there is no "|", the terminating "]]") must be on the same line; other spaces and line breaks are ignored if they are next to "|" characters or just inside the brackets. Spaces or line breaks are not allowed just before the "=" in the following options, and may have undesirable side effects if they appear just after the "=".

Type

Zero or one of these options may be specified to control whether or not the image is scaled down and given a border.

thumb
(Or thumbnail.) Scale the image down, and put a box around the image. Show any caption below the image. Float the image on the right unless overridden with the location attribute. If no image size is specified, use a per-user preference for logged-in users (see "Thumbnail size" under {under your user preferences appearance files ), defaulting to 220 pixels for non-logged-in users. May be used in conjunction with the "upright" option. With an operand, e.g., "thumb=Example.png", the operand names an image that is used as the thumbnail, ignoring any size specification.
frame
Preserve the original image size, and put a box around the image. Show any caption below the image. Float the image on the right unless overridden with the location attribute. Displayed size of an image will not be scaled when "frame" is used.
(nothing specified)
Preserve the original image size, and do not add a border around the image. Do not show a caption. If no alt text is specifically requested, use the requested caption as alt text.
frameless
Scale the image down. Place the image inline with the text unless overridden with the location attribute. If no image size is specified, use a per-user preference for logged-in users (see "Thumbnail size" (under your user preferences appearance files ), defaulting to 300 pixels for non-logged-in users. May be used in conjunction with the "upright" option.

Border

border
Generate a one-pixel border around the image. This has an effect only around unframed images ('none' and 'frameless'), as framed images always have borders.

Location

Zero or one of these options may be specified to control the position of the image.

right
Place the image on the right side of the page. The article text that follows the image flows around the image. This is the default when thumb or frame is used.
left
Place the image on the left side of the page. The article text that follows the image flows around the image.
center
Place the image in the center of the page. The article text that follows the image is placed below the image.
none
Place the image on the left side of the page. The article text that follows the image is placed below the image.

If none of these four options is used, and neither thumb nor frame is present, the image is placed inline with the text, smile like this.

Vertical alignment

Zero or one of these options may be specified to control the vertical alignment of the image with respect to adjacent text. These options apply only to plain images, which do not cause breaks and are not floated (that is, they do not work with images that have text wrap to flow around them). To make text flow around an image, place the image preceding the text. In the following list, each option's explanation is preceded by what File:Flag of Albania.png looks like when aligned with that option, using the markup:

[[File:Flag of Albania.png|option|8px|link=|alt=]]
baseline
Align the bottom of the image with the baseline of the text.
middle
(This is the default.) Align the vertical middle of the image with the baseline of the text plus half the x-height of the text, so that the image is vertically centered around a lower case "x" in the text.
sub
Align the bottom of the image to the same level that the bottom of a subscript would be, such as the bottom of the "2" in "X2".
super
Align the bottom of the image to the same level that the bottom of a superscript would be, such as the bottom of the "2" in "X2".
text-top
Align the top of the image to the top of the text. This is often a bit higher than the top of a capital letter, because of ascenders in letters like lower-case "h".
text-bottom
Align the bottom of the image to the bottom of the text. This is somewhat lower than the baseline, because of descenders in letters like lower-case "y".
top
Align the top of the image to the top of the line containing the text. Normally this is slightly higher than the top of the text, to make space between lines of text.
bottom
Align the bottom of the image to the bottom of the line containing the text. Normally this is slightly lower than the bottom of the text.

Size

Any or none of these options may be specified to control the size of the image. In the case of images with captions, if the image is already smaller than the requested size, then the image retains its original size (it is not enlarged). In the case of images without captions, the image will be enlarged or reduced to match the requested size. Sizing is disabled when a 'frame' is used.

Widthpx
(E.g., "100px".) Scale the image to make it the specified number of pixels in width, and scale the height to retain the original aspect ratio.
xHeightpx
(E.g., "x150px".) Scale the image to make it the specified number of pixels in height, and scale the width to retain the original aspect ratio.
WidthxHeightpx
(E.g., "100x150px".) Scale the image to be no wider and no higher than the specified number of pixels. The image will keep its original aspect ratio.
(nothing specified)
For thumbnails, use the size specified in preferences for logged in users, and use a size determined by resolution for anonymous users. For non-thumbnails, use the native size of the image.
upright
Scale a thumbnail image to 75% of normal thumbnail width, rounding the result to the nearest multiple of 10 pixels.
upright=Factor
Adjust a thumbnail's size to Factor times the default thumbnail size, rounding the result to the nearest multiple of 10. For instance, "upright=1.5" makes the image larger, which is useful for maps or schematics that need to be larger to be readable. The parameter "upright=1" returns the same size as thumbnail width, and "upright=0.75" is functionally identical to "upright" alone. If you set Factor equal to the image's aspect ratio (width divided by height) the result is equivalent to scaling the height to be equal to the normal thumbnail width.

The "upright" option must be used along with the "thumb" or "frameless" parameter.

Link

Ordinarily, an image acts as a hypertext link to the image description page, a page with information about the image itself. Using the link option allows an image to act as a hypertext link to a different page.

link=Page
The image acts as a hypertext link to the specified page. Do not enclose the page name in square brackets. If Page is a URL, the image acts as an external link; otherwise it links to the named Wikipedia page.
link=
No hyperlink is created. Clicking on the image will have no action.

The "link" parameter cannot be used in conjunction with "thumb", as "thumb" is always meant to link to the larger version of the image. In addition, "link" cannot be used with "frame".

File:File:ANKER Albert 1897 Schlafender Knabe im Heu 2660x2075.jpg rendered as a thumbnail above; Media:ANKER Albert 1897 Schlafender Knabe im Heu 2660x2075.jpg is the direct link

One may wish to link directly to the image file without displaying any thumbnail or preview image at all, possibly useful for downloading or viewing directly with a compatible browser. The ANKER Albert 1897 Schlafender Knabe im Heu 2660x2075.jpg‎ at the right contains [[Media:ANKER Albert 1897 Schlafender Knabe im Heu 2660x2075.jpg‎]] as such a virtual Media link in its caption.

Alt text and caption

Zero or more of these options may be specified to control the alt text, link title, and caption for the image. Captions may contain embedded wiki markup, such as links or formatting.

alt=Alt
Use Alt as the alt text for the image.
Caption
(any text that is not recognised as some other part of the image syntax): How this text is used depends on the image type. When the type has a visible caption ("thumbnail", "thumb", "frame" or "framed") then this text appears as a caption below the image. Otherwise, (if the image type is unspecified or is "frameless"), this text is used for the link title provided the link has not been suppressed with "|link=", and also for the alt text provided an explicit alt=Alt has not been supplied.

The actual alt text for the displayed image will be one of the following, in order of preference:

  1. The explicitly requested Alt, if any;
  2. The explicitly requested Caption, if the image type has no visible caption;
  3. The empty string, if there is an explicitly requested Caption and the image type has a visible caption.
  4. The image file name if there is no explicitly requested Alt or Caption. This is never a satisfactory option.

It is only possible to specify the link title text for images with no visible caption (as described above). However, as not all browsers display this text, and it is ignored by screen readers, there is little point.

How to display an image in uploaded size, with a caption

To display an image as uploaded with a caption use [[File:Hyacinth.jpg|frame|none|alt=Alt text|Caption text]].

Alt text
Caption text

How to display an image with no caption or formatting

The old syntax for images without captions is [[File:Westminstpalace.jpg|Alt text]]. This is rendered inline, and the specified text is used as the image's alt attribute (alternate text for programs which cannot display images, such as screen readers) and as the title attribute (supplementary text, often displayed as a tooltip when the mouse is over the image).

See Wikipedia:Image markup with HTML for an old, deprecated, way of putting a caption under the image using HTML code. Please use the new way of associating captions with images, as described on this page.

See Wikipedia:Captions for discussion of appropriate caption text. See Wikipedia:Alternative text for images for discussion of appropriate alt text.

Example

Alt text

New syntax for images

A large clock tower and other buildings line a great river.
Face-smile.png

The new syntax is backward compatible, so articles don't have to be changed.

In the syntax [[File:filename|options]] (e.g., [[File:Face-smile.png|thumb|100px|left|alt=A large clock tower and other buildings line a great river.|The Palace of Westminster]] shown in the left), several options can be set when including an image. Those affect the placing of the image, its size or the way the image will be presented. The options are right, left, center, none, sizepx, thumbnail (thumb), frame, and alternate (caption) text.
A large clock tower and other buildings line a great river.
face smiling
  • The options can be combined, and vertical bars ("|") are used to separate options from each other.
  • Do not put spaces around the vertical bars for readability – options will not be interpreted correctly.
  • The options can be put in any order.
  • An unknown option is taken as the caption text, but this will appear only if thumbnail or frame are specified.
  • If there are two or more unknown options, the last one upstages the rest: [[Face-smile.png|thumb|alt=Face-smile.png.|Face-smile.png|200px|right|Face-smile.png]] (shown on the right).

Here is the description of the options other than the caption text:

right

A large clock tower and other buildings line a great river.
The image is right-aligned, and text floats to the left of the image: [[File:Face-smile.png|right|70px|alt=Face-smile.png.]] (shown on the right).

left

A large clock tower and other buildings line a great river.
The image is left aligned, and text floats to the right of the image: [[File:Face-smile.png|left|70px|alt=A large clock tower and other buildings line a great river.]] (shown on the left).

center

The image is centered, and...
A large clock tower and other buildings line a great river.
the text following the image starts below it: [[File:Face-smile.png|center|70px|alt=A large clock tower and other buildings line a great river.]] (shown above).

none

The image is put at the left, and...
A large clock tower and other buildings line a great river.
the text following does not float to the right (or to the left, obviously), and starts below it: [[File:Face-smile.png|none|70px|alt=A large clock tower and other buildings line a great river.]] (shown above).

Notes:
A large clock tower and other buildings line a great river.
The four options below (center, left, none, and right) are incompatible. When used combined, the first one overrides the rest: [[File:Face-smile.png|center|left|none|right|70px|alt=A large clock tower and other buildings line a great river.]] (shown in the center).
A large clock tower and other buildings line a great river.
What is between the last vertical bar and the closing brackets ("]]"), void or not, is taken as the last option, and works as usual. For instance, when the last option is right, the image is right-aligned, and text floats to the left: [[File:Face-smile.png|70px|alt=A large clock tower and other buildings line a great river.|right]] (shown on the right).
A large clock tower and other buildings line a great river.
A large clock tower and other buildings line a great river.
This text is displayed.
In particular, if the last option is the void text (that is, if there is nothing between the last vertical bar and the closing brackets), the caption is not displayed: [[File:Westminstpalace.jpg|thumb|alt=A large clock tower and other buildings line a great river.|This text is not displayed.|70px|left|]] (shown on the left) and [[File:Face-smile.png|thumb|alt=A large clock tower and other buildings line a great river.|This text is displayed.|70px|right]] (shown on the right).
File:Westminstpalace.jpg
There is in HTML/CSS a floating issue that prevents certain images (or other multimedia objects) from floating above others. It occurs only if:
  • there are multiple multimedia objects on one side of the page
  • the multimedia object on the other side of the page comes after the other ones in the source code
The first multimedia object on the latter side of the page won't float above the last multimedia object on the former (see images on left and right). To get around it, you have to alternate between left and right in aligning images or other multimedia objects (see below) or, when that's not possible, set to "none" the alignment of the one that won't float above the others (see the population table here for an example).


File:Westminstpalace.jpg
sizepx
A large clock tower and other buildings line a great river.
This option renders a version of the image that's [size] pixels wide (e.g., [[File:Face-smile.png|right|50px|alt=A large clock tower and other buildings line a great river.]] shown on the right). Height is computed to keep the ratio (i.e. the shape of the image).
Notes:
Specifying a size does not just change the apparent image size using HTML; it actually generates a resized version of the image on the fly and links to it appropriately. This happens whether or not you specify the size in conjunction with "thumb".
This means the server does all the work of changing the image size, not the web browser of the user. By having the server do all the work means faster downloading of pages. It also means that larger images can be stored on the server without any slowdown by the browser (especially on dial up telephone lines). Only the data for the actual size on the page is transmitted.
An exception is animated GIF images. Animated GIF images are not processed by the server. When a smaller size is specified the original full sized animated GIF image is served. Whether the animated GIF image is subsequently scaled to fit the allotted space belongs to the capabilities of the receiving browser. Resizing an animated GIF image will significantly reduce its quality, without any reduction of download time.
From MediaWiki 1.5 the default thumbnail width can be set in the preferences, so it is recommended not to specify "px", in order to respect the users' preferences (unless, for a special reason, a specific size is required regardless of preferences, or a size is specified outside the range of widths 120–300 pixels that can be set in the preferences).
If you specify a "frame" option the image will not be scaled, and no size specifiers will be in the HTML. The image will be rendered at full size.
A large clock tower and other buildings line a great river.
When there are two or more "size" options, only the last one is valid: [[File:Face-smile.png|right|50px|80px|alt=File:Face-smile.pngr.]] (shown on the right).
thumbnail, thumb
A large clock tower and other buildings line a great river.
A large clock tower and other buildings line a great river.
File:Face-smile.png
The thumbnail (thumb) option generates an image. It is automatically resized when the "size" attribute is not specified. Without the options left, center, and none, the image is normally on the right. If the image has a caption text, it is displayed in the lower margin. E.g., [[File:Face-smile.png|thumbnail|left|100px|alt=File:Face-smile.png]] (shown on the left) and [[File:Face-smile.png|thumb|alt=File:Face-smile.png|File:Face-smile.png]] (shown on the right). Note: thumbnail (thumb) cannot be used in lists.
Tiny globe
This is a globe, and take a look at it in the actual size.
An "enlarge" icon is put also in the lower margin of the thumbnail. Both the image itself and the icon link to the image description page with the image in its actual size. The icon shows the link title "Enlarge" in its hoverbox, even in cases where this term does not apply, because it leads from the enlarged image to the one with the actual size. E.g., [[File:tst.png|right|thumb|100px|alt=Tiny globe|This is a globe, and take a look at it in [[Media:tst.png|the actual size]].]] (shown on the right).
upright
File:Face-smile.png
The "upright" option is about 75% of thumbnail width.
File:Face-smile.png
The "upright=1.5" option
The upright option works in combination with the thumbnail or thumb option to resize an image to about 75% of the width of a plain thumbnail. The upright option scales larger or smaller in step with user screen resolution. The relative size can be determined with a multiplier such as upright=x. If x=1 then the image is standard thumbnail width. E.g., [[File:Face-smile.pngg|thumbnail|upright|left|alt=A large clock tower and other buildings line a great river.|The "<code>upright</code>" option is about 75% of thumbnail width.]] (shown on the left) and [[File:Face-smile.png|thumb|upright=1.5|right|alt=A large clock tower and other buildings line a great river.|The "<code>upright=1.5</code>" option]] (shown on the right).
frame
A large clock tower and other buildings line a great river.
The Palace of Westminster
With this option, the embedded image is shown with its actual size enclosed by a frame, regardless of the "thumb" or "size" attribute, and the caption, if any, is visible in the frame. Without the options left, center, and none, the image is normally on the right: [[File:Face-smile.png|frame|thumbnail|50px|alt=A large clock tower and other buildings line a great river.|The Palace of Westminster]].

With none of the options other than sizepx and alternate (caption) text, an embedded image is rendered inline.

text text text text text text
[[File:Face-smile.png|150px|alt=A large clock tower and other buildings line a great river.|The Palace of Westminster]]
text text text text text
[[File:tst.png|100px|alt=Tiny globe|This is a globe.]]
text text text text

gives

text text text text text text A large clock tower and other buildings line a great river. text text text text text Tiny globe text text text text

The option none can be used to have thumbnails without left- or right-alignment. This is probably most useful for tables. This is an example:

How to use none
London's palaces
Palace of Westminster
A large clock tower and other buildings line a great river.
From the Thames
[[File:Westminstpalace.jpg|thumb|none|100px|alt=A large clock tower and other buildings line a great river.|From the Thames]]
Buckingham Palace
Grand city building below beautiful blue sky and clouds
Queen's home
[[File:Buckingham palace Copyright2003KaihsuTai.jpg|thumb|none|100px|alt=Grand city building below beautiful blue sky and clouds|Queen's home]]

Thumbnail with caption text underneath that has one or more links

From MediaWiki 1.3, it is also possible to include links in the caption text, e.g.:

[[File:Westminstpalace.jpg|right|thumbnail|alt=A large clock tower and other buildings line a great river.|This is the [[Palace of Westminster]] in London]]
A large clock tower and other buildings line a great river.
This is the Palace of Westminster in London


Just make sure the number of opening and closing square brackets are right. One extra or missing would mean the entire image syntax line would not work.

Additional caption formatting options

Additional caption formatting options are possible.

[[File:Westminstpalace.jpg|right|thumbnail|alt=A large clock tower and other buildings line a great river.|<div align="center">This is <span style="color: green">the </span><br /> [[Palace of Westminster]]<br /> '''in <span style="color: red">London</span>'''</div>]]
A large clock tower and other buildings line a great river.
This is the
Palace of Westminster
in London


All of the normal text formatting options work.

Overlaying annotations on an image

In some cases, it may be desirable to add clickable annotations to an image. The templates Template:Annotated image and Template:Annotated image 4 exist for this purpose.

These templates allow wikitext (e.g., regular text, wikilinks, allowed html code, references, and other templates) to be included on the image itself. They may also be used to crop an image so as to focus on a particular portion of it, or alternatively, expand the white area around an image for better placement of wikitext.

Annotated image template examples
Template:Annotated image Template:Annotated image 4
File:Wiwaxia body zones.png
The image and caption as a thumb, sans annotations

Compatibility considerations

The floating options left, center, and right explained above are supported by modern browsers, but don't work with older browsers. If necessary it's simple to get a floating effect also for old browsers:

A large clock tower and other buildings line a great river.
{| align="right"
| [[File:Westminstpalace.jpg|160px|alt=A large clock tower and other buildings line a great river.|Example]]
|}

This code is not intended for general use, however. There are few, if any, instances where support for such legacy browsers is necessary.

Cancelling floating-around-image mode

After having had an image floating next to text, putting further text below it and again using the full width can be done with the following markup. This blocks an image from appearing next to the material following this markup, possibly due to aesthetic reasons or a change in topics.

<br style="clear:both" />

For legacy align="right" (etc.) floating this isn't good enough; legacy browsers would ignore inline CSS. To cancel floating under all conditions the following markup (valid XHTML 1.0 transitional) works:

<br clear="all" />

The same code can be issued by using template {{clear}} or {{Clr}} or {{-}} in certain namespaces (en, meta).

Linking to the image without displaying it

If you don't want to show or display the image but rather just want to make a link to the description page for an image, use a leading colon before "File:" in an intra-wiki link, like this: [[:File:STS-32 crew.jpg|STS-32 crew]] which yields: STS-32 crew.

Images that link somewhere other than the image description page

See also: Wikipedia:Images linking to articles

It is possible to make an image that links to a different page instead of to the image description page. This should be done conscious of the image's licensing terms and can be achieved by using the "|link=" option. To disable the link altogether and have a purely decorative image, in the sense that the image is not shown to visually impaired readers, use "|link=|alt=", with no arguments for either parameter.

Multimedia syntax

The extended syntax, in addition to yet more syntax, can also be applied to sound and video files. In these examples, File:, the namespace equivalent to Image:, is used. Either namespace can be used.


More syntax for videos

Hopefully videos will be coming soon to BoyWiki.
Initial still image
"thumbtime=Time". Use the frame from the video at the given time as the initial still image. Time is either a number of seconds, or hours, minutes and seconds separated by colons. Without a thumbtime parameter, a frame from the midpoint of the video is used by default. For instance, using the same video file as previously:
File:Cat.mp4
Man in suit tie and hat at 21 seconds. Time syntax using seconds only: "21".
File:Cat.mp4
Monoplane seen at 23 seconds. Time syntax using minutes and seconds: "0:23".
File:Cat.mp4
Landed biplane seen at 33 seconds. Time syntax using hours, minutes and seconds: "0:0:33".

Displaying small videos larger

To display a video larger than its uploaded size use "|thumb" and "|numberpx". This may be useful if the original video is very small but shows some important but small detail, but note that upscaling may create unexpected scaling artifacts. For example, the code

[[File:cal16x16check_vdnocnoafr1len2.avi.q10.ogv|inline|left]] [[File:cal16x16check_vdnocnoafr1len2.avi.q10.ogv|right|thumb|128px]]

displays the 16 pixels wide video at its original size on the left and eight times wider at the right (the squares should be all black or all white and the edges should be sharp — any blurriness or off-white colour is likely due to the browser or the Wikimedia server rendering):

inline
inline
File:Cal16x16check vdnocnoafr1len2.avi.q10.ogv

Thumbtime in a gallery

The thumbtime parameter can also be used inside a gallery (either with <gallery> tags or the {{Gallery}} template):

Here is the wikicode that created it:

<gallery>
File:First flights in aviation history.ogg|thumbtime=21|Man in suit tie and hat at 21 seconds.
File:First flights in aviation history.ogg|thumbtime=0:23|Monoplane seen at 23 seconds.
</gallery>

See also