Aide:Image et fichier : Différence entre versions

De WikiGenWeb
Aller à : navigation, rechercher
m (Syntaxe)
m (Suppression catégorie : Nouvel article)
 
(9 révisions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
Il est possible de téléverser des images et des fichiers sur le serveur {{wgw}} puis de les insérer dans les pages de différentes manières.
+
Il est possible de téléverser des images et des fichiers sur le serveur {{wgw}} puis de les insérer dans les pages de différentes manières.
  
 
Depuis les dernières versions de Médiawiki, tout est nommé ''« Fichier »'', que ce soit images, fichiers pdf ou autres fichiers.
 
Depuis les dernières versions de Médiawiki, tout est nommé ''« Fichier »'', que ce soit images, fichiers pdf ou autres fichiers.
  
Pour utilsier une image, elle doit d'abord avoir été [[Aide:Importer un fichier|téléversée sur le serveur]].
+
Pour utiliser une image, elle doit d'abord avoir été [[Aide:Importer un fichier|téléversée sur le serveur]].
  
 
== Téléversement ==
 
== Téléversement ==
Ligne 19 : Ligne 19 :
  
 
== Afficher un fichier ==
 
== Afficher un fichier ==
Pour afficher un fichier stocké sur {{wgw}} il faut utiliser le préfixe de l'[[Aide:Espace de noms|espace de nom]] : ''« Fichier: »''. Les préfixes ''« Image: »'' et ''«  Media: »'' sont encore supportés mais il est préférable de ne pas les utiliser.
+
Pour afficher un fichier stocké sur {{wgw}} il faut utiliser le préfixe de l'[[Aide:Espace de noms|espace de nom]] : ''« Fichier: »''. Le préfixe  ''« Image: »'' est encore supporté mais il est préférable de ne pas l'utiliser.
  
 
=== Syntaxe ===
 
=== Syntaxe ===
Ligne 30 : Ligne 30 :
 
*:Contrôle la façon dont l'image rendue est formatée et placée dans le reste de la page.
 
*:Contrôle la façon dont l'image rendue est formatée et placée dans le reste de la page.
 
* Option ''[[#Taille et bordure|Redimensionnement]]'' : une des valeurs
 
* Option ''[[#Taille et bordure|Redimensionnement]]'' : une des valeurs
** ''{width}'''''px''' — Redimensionne l'image  pour l'adapter à la largeur maximale donnée en  pixels, sans restreindre sa  hauteur;
+
** ''{width}'''''px''' — Redimensionne l'image  pour l'adapter à la   largeur maximale donnée en  pixels, sans restreindre sa  hauteur;
** '''x'''''{height}'''''px''' — Redimensionne l'image pour l'adapter à une hauteur maximale donnée en  pixels, sans restreindre sa  largeur;
+
** '''x'''''{height}'''''px''' — Redimensionne l'image pour l'adapter à   une hauteur maximale donnée en  pixels, sans restreindre sa  largeur;
 
** ''{width}'''''x'''''{height}'''''px''' — Redimensionne l'image pour l'adapter à la largeur et à la hauteur en  pixels;
 
** ''{width}'''''x'''''{height}'''''px''' — Redimensionne l'image pour l'adapter à la largeur et à la hauteur en  pixels;
** '''upright''' — Redimensionne une image pour l'adapter à  des dimensions raisonnables, selon les préférences de l'utilisateur (convient aux images dont la hauteur est supérieure à la  largeur).
+
** '''upright''' — Redimensionne une image pour l'adapter à  des dimensions raisonnables, selon les préférences de l'utilisateur (convient aux images dont la hauteur est supérieure à la  largeur).
 
*: Notez que l'image conservera toujours son ratio d'aspect.
 
*: Notez que l'image conservera toujours son ratio d'aspect.
 
* Option ''[[#Alignement horizontal|Alignement Horizontal]]'' une des valeurs '''left''', '''right''', '''center''', '''none''';
 
* Option ''[[#Alignement horizontal|Alignement Horizontal]]'' une des valeurs '''left''', '''right''', '''center''', '''none''';
 
*: Contrôle l'alignement horizontal (en ligne ou en bloc flottant) de  l'image dans un  texte (aucune valeur par  défaut).
 
*: Contrôle l'alignement horizontal (en ligne ou en bloc flottant) de  l'image dans un  texte (aucune valeur par  défaut).
 
* Option ''[[#Alignement vertical|Alignement Vertical]]'': une des valeurs '''baseline''', '''sub''', '''super''', '''top''', '''text-top''', '''middle''', '''bottom''', '''text-bottom''';
 
* Option ''[[#Alignement vertical|Alignement Vertical]]'': une des valeurs '''baseline''', '''sub''', '''super''', '''top''', '''text-top''', '''middle''', '''bottom''', '''text-bottom''';
*: Contrôle l'alignement vertical d'une image non-flottante en ligne avec le texte avant ou après l'image et dans  le même bloc (l'alignement vertical par défaut est ''middle'').
+
*: Contrôle l'alignement vertical d'une image non-flottante en ligne avec le texte avant ou après l'image et dans  le même bloc (l'alignement vertical par défaut est ''middle'').
 
* Option ''[[#Modification de la cible du lien par  défaut|Link]]'': une des valeurs
 
* Option ''[[#Modification de la cible du lien par  défaut|Link]]'': une des valeurs
** '''link='''''{target}'' — Allows to change the target (to an arbitrary page title, or URL) of the generated link, activable on the rendered image surface;
+
** '''link='''''{cible}'' — Permet de changer la cible (un titre de page ou une URL) du lien généré, activable par un clic sur l'image;
** '''link=''' (with an empty value) — ({{mediawiki|rev:41727|MediaWiki 1.14+}}) Displays an image without any activable link; e.g. <code><nowiki>[[</nowiki>File:Example.jpg|20px|link=]]</code> renders as [[File:Example.jpg|20px|link=]].
+
** '''link=''' (sans lien) — Affiche une image sans lien ; e.g. <code><nowiki>[[</nowiki>Fichier:wiki.png|20px|link=]]</code> affichera [[Fichier:wiki.png|20px|link=]].
: '''!''' Link does '''not''' work with thumb, thumbnail or frame.
+
: Ce paramètre ne fonctionne pas avec les formats ''« thumb »'' ou ''« frame »''.
* Other specific options:
+
* Autres options spécifiques :
** '''alt='''''{alternative text}'' — ({{mediawiki|rev:41837|MediaWiki 1.14+}}) Defines the alternative text (maps to the HTML attribute <code>alt="..."</code> of the generated <code>&lt;image /&gt;</code> element) of an image that will be rendered if either the referenced image cannot be downloaded and embedded, or if the support media must use the alternative description text (e.g. when using a Braille reader or with accessibility options set by the user in its browser).
+
** '''alt='''''{Texte alternatif}'' — définit le texte alternatif lorsque  l'image ne peut pas être rendue (Accessibilité aux mal-voyants).
** '''page='''''{number}'' — Renders the specified page number (currently only applicable when showing a .djvu or .pdf file).
+
** '''page='''''{numéro}'' — Affiche la page spécifiée par numéro. Ne s'utilise qu'avec les fichiers PDF.
  
The options can be given in any order. If the given ''options'' conflict each other, the latter is applied, except for the ''format'' options, where the options take the priority in the order of: '''frame'''; '''thumb''' (or '''thumbnail'''); '''frameless''' and/or '''border'''.
+
Les  options peuvent être données dans  n'importe quel ordre. Si  les  options ''données'' sont en conflit les unes avec les autres, la  dernière est appliquée, sauf pour l'''« option Format »'' où les options ont la priorité dans  l'ordre '''cadre''', '''vignette''', '''sans  cadre''' et '''border'''.
 +
Si  un paramètre ne  correspond à aucune  des possibilités, il est supposé être le texte de la légende. La  légende ne sera affichée qu'avec les formats avec cadre et peut contenir  des  liens wiki et autres mises en forme.
  
If a parameter does not match any of the other possibilities, it is assumed to be the caption textCaption text shows below the image in '''thumb''' and '''frame''' formats, or as mouseover text in '''border''', '''frameless''' formats or when the format is omitted. Caption text displayed in the '''thumb''' and '''frame''' formats may contain wiki links and other formatting. In the other options, wiki-formatting will not work though transclusion will.
+
Si aucun  texte de légende est fourni, une légende est automatiquement créée avec  le nom  du fichier. Pour supprimer complètement la légendeil faut la  mettre à : <code><nowiki><span title=""></span></nowiki></code>.
  
If no caption text is supplied, a caption is automatically created showing the file name. To completely remove the caption, set it to <code><nowiki><span title=""></span></nowiki></code>. For example, <code><nowiki>[[File:Example.jpg|20px|<span title=""></span>]]</nowiki></code> renders as [[File:Example.jpg|20px|<span title=""></span>]].
+
Par example, <code><nowiki>[[Fichier:Wiki.png|20px|<span title=""></span>]]</nowiki></code> rendra ceci  [[Fichier:Wiki.png|20px|<span title=""></span>]].
  
 
=== Format ===
 
=== Format ===
The following table shows the effect of all available formats.
+
Effet des différents formats :
 
+
{|class="wikitable-center"
{|class="wikitable plainlinks"
 
 
|-
 
|-
 
!Description
 
!Description
!You type
+
!Wikitext
!You get
+
!Rendu
{{Help:Images/frame|frame=|ex=no format specified|float=no|inline=yes}}
+
|-
{{Help:Images/frame|frame=border|ex='''border''' results in a very small gray border|float=no|inline=yes}}
+
|Aucun formatage
{{Help:Images/frame|frame=frameless|ex='''frameless''', like thumbnail, respect user preferences for image width, but without border and no right float|float=no|inline=yes}}
+
|<pre>texte texte texte [[Fichier:wiki.png|50px]] texte texte texte</pre>
{{Help:Images/frame|frame=frameless|2=border|ex='''frameless''' and '''border'''|float=no|inline=yes}}
+
|texte texte texte [[Fichier:wiki.png|50px]] texte texte texte
{{Help:Images/frame|frame=frame|ex='''frame'''|float=yes|inline=no}}
+
|-
{{Help:Images/frame|frame=thumb|ex='''thumb''' or '''thumbnail'''|float=yes|inline=no}}
+
|Bordure
 +
|<pre>texte texte texte [[Fichier:wiki.png|border|50px]] texte texte texte</pre>
 +
|texte texte texte [[Fichier:wiki.png|border|50px]] texte texte texte
 +
|-
 +
|Cadre
 +
|<pre>texte texte texte [[Fichier:wiki.png|frame|50px]] texte texte texte</pre>
 +
|texte texte texte [[Fichier:wiki.png|frame|50px]] texte texte texte
 +
|-
 +
|Pas de cadre
 +
|<pre>texte texte texte [[Fichier:wiki.png|frameless|50px]] texte texte texte</pre>
 +
|texte texte texte [[Fichier:wiki.png|frameless|50px]] texte texte texte
 +
|-
 +
|Vignette
 +
|<pre>texte texte texte [[Fichier:wiki.png|thumb|50px]] texte texte texte</pre>
 +
|texte texte texte [[Fichier:wiki.png|thumb|50px]] texte texte texte
 
|}
 
|}
  
When the height of an image in thumbnail is bigger than its width (i.e. in portrait orientation rather than landscape) and you find it too large, you may try the option <code>upright</code>, which will try to adjust its size to more desirable size by reducing the height instead the width. The alternative is to specify the desired maximum height (in pixels) explicitly.
+
=== Taille et bordure ===
  
Note that by writing <code>thumb={filename}</code>, you can use a different image for the thumbnail.
+
Parmi les différents formats, l'effet du paramètre de taille peut être différent, comme le montrent les exemples ci-dessous.  
  
=== Taille et bordure ===
+
Lorsque  le format n'est pas spécifié, ou seulement  <code>border</code>, la taille peut être à la fois réduite  et élargie à toute taille spécifiée.  
Among different formats, the effect of the size parameter may be different, as shown below.
+
* Dans les exemples ci-dessous, la taille originale de l'image est de 135x135 pixels.  
* For how it appears when its size is not specified, see [[#Format|Format]] section above.
+
* Une image avec cadre <code>frame</code> ignore toujours les spécifications de taille, l'image d'origine sera réduite si elle dépasse la taille maximale définie dans les préférences utilisateur.  
* When the format is not specified, or only <code>border</code>ed, the size can be both reduced and enlarged to any specified size.
+
* La taille d'une image avec <code>thumb</code> peut être réduite, mais ne peut pas être élargie au-delà de la taille d'origine de l'image.  
* In the examples below, the original size of the image is 400 × 267 pixels.
+
{|class="wikitable-center"
* An image with <code>frame</code> always ignores the size specification, the original image will be reduced if it exceeds the maximum size defined in user preferences.
+
|-
* The size of an image with <code>thumb</code> can be reduced, but can not be enlarged beyond the original size of the image.
+
! Format !! Réduit!! Agrandi
 
+
|-
{|class="wikitable"
+
|Sans format
 +
|<pre>[[Fichier:wiki.png|30px]]</pre>[[Fichier:wiki.png|30px]]
 +
|<pre>[[Fichier:wiki.png|250px]]</pre>[[Fichier:wiki.png|250px]]
 +
|-
 +
|Border
 +
|<pre>[[Fichier:wiki.png|border|30px]]</pre>[[Fichier:wiki.png|border|30px]]
 +
|<pre>[[Fichier:wiki.png|border|250px]]</pre>[[Fichier:wiki.png|border|250px]]
 +
|-
 +
|Avec cadre
 +
|<pre>[[Fichier:wiki.png|frame|30px]]</pre>[[Fichier:wiki.png|frame|30px]]
 +
|<pre>[[Fichier:wiki.png|frame|250px]]</pre>[[Fichier:wiki.png|frame|250px]]
 +
|-
 +
|Vignette
 +
|<pre>[[Fichier:wiki.png|thumb|30px]]</pre>[[Fichier:wiki.png|thumb|30px]]
 +
|<pre>[[Fichier:wiki.png|thumb|250px]]</pre>[[Fichier:wiki.png|thumb|250px]]
 
|-
 
|-
! Format !! Reduced !! Enlarged
+
|Sans cadre
{{Help:Images/size|frame=}}
+
|<pre>[[Fichier:wiki.png|frameless|30px]]</pre>[[Fichier:wiki.png|frameless|30px]]
{{Help:Images/size|frame=border}}
+
|<pre>[[Fichier:wiki.png|frameless|250px]]</pre>[[Fichier:wiki.png|frameless|250px]]
{{Help:Images/size|frame=frame}}
 
{{Help:Images/size|frame=thumb}}
 
{{Help:Images/size|frame=frameless}}
 
 
|}
 
|}
  
 
=== Alignement horizontal ===
 
=== Alignement horizontal ===
Note that when using the <code>frame</code> or <code>thumb[nail]</code> formats, the default horizontal alignment will be <code>right</code>.
 
  
{|class="wikitable"
+
Notez  que lorsque vous utilisez le format <code>frame</code> ou  <code>thumb</code>, l'alignement par défaut est à droite.
 +
{|class="wikitable-center"
 
|-
 
|-
 
!Description
 
!Description
!You type
+
!wikitexte
!You get
+
! style="width:100px" |Rendu
{{Help:Images/frame|2=100px|frame=|ex='''no horizontal alignment specified''', or default alignment|inline=yes|float=no}}
+
|-
{{Help:Images/frame|2=100px|frame=none|ex=specify horizontal alignment as: '''none'''|inline=no|float=no}}
+
|Sans spécification
{{Help:Images/frame|2=100px|frame=center|ex=specify horizontal alignment as: '''center'''|inline=no|float=no}}
+
|<pre>... text text text [[Fichier:wiki.png|30px|caption]] text text text ...</pre>
{{Help:Images/frame|2=100px|frame=left|ex=specify horizontal alignment as: '''left'''|inline=no|float=yes}}
+
|... text text text [[Fichier:wiki.png|30px|caption]] ... text text text ...
{{Help:Images/frame|2=100px|frame=right|ex=specify horizontal alignment as: '''right'''|inline=no|float=yes}}
+
|-
 +
|Spécification none
 +
|<pre>... text text text [[Fichier:wiki.png|none|30px|caption]] text text text ...</pre>
 +
|... text text text [[Fichier:wiki.png|30px|none|caption]] ... text text text ...
 +
|-
 +
|Spécification center
 +
|<pre>... text text text [[Fichier:wiki.png|center|30px|caption]] text text text ...</pre>
 +
|... text text text [[Fichier:wiki.png|30px|center|caption]] ... text text text ...
 +
|-
 +
|Spécification left
 +
|<pre>... text text text [[Fichier:wiki.png|left|30px|caption]] text text text ...</pre>
 +
|... text text text [[Fichier:wiki.png|30px|left|caption]] ... text text text ...
 +
|-
 +
|Spécification right
 +
|<pre>... text text text [[Fichier:wiki.png|right|30px|caption]] text text text ...</pre>
 +
|... text text text [[Fichier:wiki.png|30px|right|caption]] ... text text text ...
 
|}
 
|}
  
 
=== Alignement vertical ===
 
=== Alignement vertical ===
The vertical alignment options take effect only if the image '''is''' rendered as an inline element and '''is not''' floating. They alter the way the inlined image will be vertically aligned with the text present in the same block before and/or after this image on the same rendered row.
 
 
Note that the rendered line of text where inline images are inserted (and the lines of text rendered after the current one) may be moved down (this will increase the line-height conditionally by additional line spacing, just as it may occur with spans of text with variable font sizes, or with superscripts and subscripts) to allow the image height to be fully displayed with this alignment constraint.
 
<div class="mw-collapsible mw-collapsed"><div class="mw-collapsible-toggle toccolours" style="float:none;text-align:center">'''{{Blue|Toggle source code view}}'''</div>
 
<div class="mw-collapsible-content">
 
<source lang="html4strict" enclose="div">
 
<p style="border:1px solid #AAA;background:#FF0;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
'''top:''' [[File:Example.jpg|20px|top]] [[File:Example.jpg|40px|top]] [[File:Example.jpg|40px|border|top]]
 
<del>text</del></u></span></p>
 
 
<p style="border:1px solid #AAA;background:#FF0;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
'''text-top:''' [[File:Example.jpg|20px|text-top]] [[File:Example.jpg|40px|text-top]] [[File:Example.jpg|40px|border|text-top]]
 
<del>text</del></u></span></p>
 
 
<p style="border:1px solid #AAA;background:#FF0;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
<sup>super:</sup> [[File:Example.jpg|20px|super]] [[File:Example.jpg|40px|super]] [[File:Example.jpg|40px|border|super]]
 
<del>text</del></u></span></p>
 
 
<p style="border:1px solid #AAA;background:#FF0;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
'''baseline:''' [[File:Example.jpg|20px|baseline]] [[File:Example.jpg|40px|baseline]] [[File:Example.jpg|40px|border|baseline]]
 
<del>text</del></u></span></p>
 
 
<p style="border:1px solid #AAA;background:#FF0;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
<sub>'''sub:'''</sub> [[File:Example.jpg|20px|sub]] [[File:Example.jpg|40px|sub]] [[File:Example.jpg|40px|border|sub]]
 
<del>text</del></u></span></p>
 
 
<p style="border:1px solid #AAA;background:#FF0;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
'''default:''' [[File:Example.jpg|20px]][[File:Example.jpg|40px]] [[File:Example.jpg|40px|border]]
 
<del>text</del></u></span></p>
 
 
<p style="border:1px solid #AAA;background:#FF0;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
'''middle:''' [[File:Example.jpg|20px|middle]] [[File:Example.jpg|40px|middle]] [[File:Example.jpg|40px|border|middle]]
 
<del>text</del></u></span></p>
 
 
<p style="border:1px solid #AAA;background:#FF0;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
'''text-bottom:''' [[File:Example.jpg|20px|text-bottom]] [[File:Example.jpg|40px|text-bottom]] [[File:Example.jpg|40px|border|text-bottom]]
 
<del>text</del></u></span></p>
 
 
<p style="border:1px solid #AAA;background:#FF0;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
'''bottom:'' [[File:Example.jpg|20px|bottom]] [[File:Example.jpg|40px|bottom]] [[File:Example.jpg|40px|border|bottom]]
 
<del>text</del></u></span></p>
 
</source></div></div>
 
 
To show the alignment result more clearly, the text spans are overlined and underlined, the line-height is increased to 200% of the font-height, the font-height is emphasized with a yellow background covering the line margins, and the full line-height is shown with a dark gray border; additionally images of different sizes are aligned, including one with an additional border that adds some pixels to its specified dimensions and slightly changes its vertical alignment:
 
 
<p style="border:1px solid #AAA;background:#FF0;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
'''top:''' [[File:Example.jpg|20px|top]] [[File:Example.jpg|40px|top]] [[File:Example.jpg|40px|border|top]]
 
<del>text</del></u></span></p>
 
 
<p style="border:1px solid #AAA;background:#FF0;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
'''text-top:''' [[File:Example.jpg|20px|text-top]] [[File:Example.jpg|40px|text-top]] [[File:Example.jpg|40px|border|text-top]]
 
<del>text</del></u></span></p>
 
 
<p style="border:1px solid #AAA;background:#FF0;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
<sup>'''super:'''</sup> [[File:Example.jpg|20px|super]] [[File:Example.jpg|40px|super]] [[File:Example.jpg|40px|border|super]]
 
<del>text</del></u></span></p>
 
 
<p style="border:1px solid #AAA;background:#FF0;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
'''baseline:''' [[File:Example.jpg|20px|baseline]] [[File:Example.jpg|40px|baseline]] [[File:Example.jpg|40px|border|baseline]]
 
<del>text</del></u></span></p>
 
 
<p style="border:1px solid #AAA;background:#FF0;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
<sub>'''sub:'''</sub> [[File:Example.jpg|20px|sub]] [[File:Example.jpg|40px|sub]] [[File:Example.jpg|40px|border|sub]]
 
<del>text</del></u></span></p>
 
 
<p style="border:1px solid #AAA;background:#FF0;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
'''default:''' [[File:Example.jpg|20px]] [[File:Example.jpg|40px]] [[File:Example.jpg|40px|border]]
 
<del>text</del></u></span></p>
 
 
<p style="border:1px solid #AAA;background:#FF0;padding:0;font-size:150%;line-height:2">
 
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
 
'''middle:''' [[File:Example.jpg|20px|middle]] [[File:Example.jpg|40px|middle]] [[File:Example.jpg|40px|border|middle]]
 
<del>text</del></u></span></p>
 
  
<p style="border:1px solid #AAA;background:#FF0;padding:0;font-size:150%;line-height:2">
+
Les  options d'alignement vertical ne prendront effet que si l'image  ''est''' rendue par un élément en ligne et '''n'est pas''' flottante. Elles  modifient la façon dont l'image inline sera alignée verticalement  avec  le texte présent dans le même bloc avant et/ou après cette image  sur  la même ligne.  
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
+
Les différentes valeurs d'alignement vertical sont :
'''text-bottom:''' [[File:Example.jpg|20px|text-bottom]] [[File:Example.jpg|40px|text-bottom]] [[File:Example.jpg|40px|border|text-bottom]]
+
;top : haut de la ligne
<del>text</del></u></span></p>
+
;text-top : haut du texte
 
+
;super : bas du texte
<p style="border:1px solid #AAA;background:#FF0;padding:0;font-size:150%;line-height:2">
+
;baseline : bas de ligne
<span style="background:#FFF;color:#000;text-decoration:overline"><u><del>text</del>
+
;sub : bas d'indice
'''bottom:''' [[File:Example.jpg|20px|bottom]] [[File:Example.jpg|40px|bottom]] [[File:Example.jpg|40px|border|bottom]]
+
;default : milieu
<del>text</del></u></span></p>
+
;middle : milieu
 
+
;text-bottom : bas de texte
Notes:
+
;bottom : bas de ligne
# The "middle" vertical alignment position of the image (which is also the default) usually refers to the middle between the x-height and the baseline of the text (on which the vertical middle of the image will be aligned, and on which usually the text may be overstroke), but not to the middle of the line-height of the font-height that refers to the space between the "text-top" and "text-bottom" positions ; the font-height excludes:
+
{|class="wikitable-center"
#* the additional line separation spacing normally divided equally into two line-margins (here 0.5em, according to line-height set to 200%) above and below the font-height).
 
#* the additional line spacing which may be added by superscripts and subscripts.
 
# However, if the image height causes its top or bottom position to go above or below the normal full line-height of text, the middle position will be adjusted after the increasing the top and/or bottom line-margins so that the image can fit and align properly, and all images (including those with smaller heights) will be vertically centered on the adjusted middle position (for computing the effective line-height, the text of each rendered row with the larger font-height will be considered).
 
# The "text-top" and "text-bottom" alignment positions also excludes the extra line spacing added by superscripts and subscripts, but not the additional line-spacing defined by the line-height.
 
# The "top" and "bottom" alignment positions take into account all these extra line spacings (including superscripts and subscripts, if they are present in a rendered line span). When the image alignment constrains the image to grow above or below the normal line-spacing, and the image is not absolutely positioned, the image will cause the "top" and "bottom" positions to be adjusted (just like superscripts and subscripts), so the effective line-height between rendered lines of text will be higher.
 
# The "underline", "overline" and "overstrike" text-decoration positions should be somewhere within these two limits and ''may'' depend on the type and height of fonts used (the superscript and subscript styles may be taken into account in some browsers, but usually these styles are ignored and the position of these decorations may not be adjusted); so these decorations normally don't affect the vertical position of images, relatively to the text.
 
 
 
=== Stopping the text flow ===
 
On occasion it is desirable to stop text (or other inline non-floating images) from flowing around a floating image.  Depending on the web browser's screen resolution and such, text flow on the right side of an image may cause a section header (for instance, <nowiki>== My Header ==</nowiki>) to appear to the right of the image, instead of below it, as a user may expect.  The text flow can be stopped by placing '''<nowiki><br style="clear: both" /></nowiki>''' before the text that should start below the floating image.
 
 
 
All images rendered as blocks (including non-floating '''center'''ed images, '''left'''- or '''right'''-floating images, as well as '''framed''' or '''thumbnail'''ed floating images) are implicitly breaking the surrounding lines of text (terminating the current block of text before the image, and creating a new paragraph for the text after them). They will then stack vertically along their left or right alignment margin (or along the center line between these margins for '''center'''ed images).
 
 
 
=== Modification de la cible du lien par défaut ===
 
The following table shows how to alter the link target (whose default is the image description page) or how to remove it. Changing the link does not alter the format described in the previous sections.
 
 
 
{|class="wikitable plainlinks"
 
 
|-
 
|-
 
!Description
 
!Description
!You type
+
! wikitexte
!You get
+
! Rendu
{{Help:Images/frame|2=link=Main Page|ex=internal link}}
+
|-
{{Help:Images/frame|2=link=http://wikipedia.org|ex=external link}}
+
|Sans spécification
{{Help:Images/frame|2=link=|ex=no link (external or file page)}}
+
|<pre>... text text text [[Fichier:wiki.png|30px|caption]] text text text ...</pre>
 +
|... text text text [[Fichier:wiki.png|30px|caption]] ... text text text ...
 +
|-
 +
|default
 +
|<pre>... text text text [[Fichier:wiki.png|default|30px|caption]] text text text ...</pre>
 +
|... text text text [[Fichier:wiki.png|default|30px|caption]] ... text text text ...
 +
|-
 +
|middle
 +
|<pre>... text text text [[Fichier:wiki.png|middle|30px|caption]] text text text ...</pre>
 +
|... text text text [[Fichier:wiki.png|middle|30px|caption]] ... text text text ...
 +
|-
 +
|top
 +
|<pre>... text text text [[Fichier:wiki.png|top|30px|caption]] text text text ...</pre>
 +
|... text text text [[Fichier:wiki.png|top|30px|caption]] ... text text text ...
 +
|-
 +
|text-top
 +
|<pre>... text text text [[Fichier:wiki.png|text-top|30px|caption]] text text text ...</pre>
 +
|... text text text [[Fichier:wiki.png|text-top|30px|caption]] ... text text text ...
 +
|-
 +
|super
 +
|<pre>... text text text [[Fichier:wiki.png|super|30px|caption]] text text text ...</pre>
 +
|... text text text [[Fichier:wiki.png|super|30px|caption]] ... text text text ...
 +
|-
 +
|baseline
 +
|<pre>... text text text [[Fichier:wiki.png|baseline|30px|caption]] text text text ...</pre>
 +
|... text text text [[Fichier:wiki.png|baseline|30px|caption]] ... text text text ...
 +
|-
 +
|sub
 +
|<pre>... text text text [[Fichier:wiki.png|sub|30px|caption]] text text text ...</pre>
 +
|... text text text [[Fichier:wiki.png|sub|30px|caption]] ... text text text ...
 +
|-
 +
|text-bottom
 +
|<pre>... text text text [[Fichier:wiki.png|text-bottom|30px|caption]] text text text ...</pre>
 +
|... text text text [[Fichier:wiki.png|text-bottom|30px|caption]] ... text text text ...
 +
|-
 +
|bottom
 +
|<pre>... text text text [[Fichier:wiki.png|bottom|30px|caption]] text text text ...</pre>
 +
|... text text text [[Fichier:wiki.png|bottom|30px|caption]] ... text text text ...
 
|}
 
|}
  
'''Warning :'''
+
== Galerie d'images ==
: The licencing requirements on your wiki may not allow you to remove all links to the description page that displays the required authors attributions, the copyrights statements, the applicable licencing terms, or a more complete description of the rendered image (including its history of modifications).
+
{{wgw}} offre la possibilité de faire des galeries d'images, avec une légende et un titre pour chaque image.  
: If you change or remove the target link of an image, you will then have to provide somewhere else on your page an explicit link to this description page, or to display the copyright and author statement and a link to the applicable licence, if they are different from the elements applicable to the embedding page itself.
 
: Your wiki policy may restrict the use of the alternate link parameter, or may even enforce a prohibition of alternate link parameters for embedded media files (in which case, the link parameter will be ignored), or may only accept to them after validation by authorized users or administrators.
 
  
== Rendering a gallery of images ==
+
===Syntaxe===
 
+
<pre>
=== Gallery syntax ===
+
<gallery caption="Légende" perrow=<images par ligne> widths=<largeur des images> heights=<hauteur des images> >
It's easy to make a gallery of '''thumbnails only''', not other images, with the <code><nowiki><gallery></nowiki></code> tag. The syntax is:
+
Fichier:Wiki.png
  <nowiki><gallery></nowiki>
+
Fichier:Wiki.png|Une légende (optionnelle)
Image:file_name.ext|caption
+
Fichier:Wiki.png
Image:file_name.ext|caption
+
Fichier:Wiki.png|Une légende (optionnelle) avec un [[Accueil|lien]]
{...}
+
........
</gallery>
 
 
 
Note that the image code is not enclosed in brackets when enclosed in gallery tags.
 
 
 
Captions are optional, and may contain wiki links or other formatting.
 
 
 
for example:
 
<nowiki><gallery></nowiki>
 
File:Example.jpg|Item 1
 
File:Example.jpg|a link to <nowiki>[[</nowiki>Help:Contents]]
 
File:Example.jpg
 
File:Example.jpg
 
File:Example.jpg| <nowiki>''italic caption''</nowiki>
 
File:Example.jpg|on page "<nowiki>{{</nowiki>PAGENAME}}"
 
</gallery>
 
is formatted as:
 
<gallery>
 
File:Example.jpg|Item 1
 
File:Example.jpg|a link to [[Help:Contents]]
 
File:Example.jpg
 
File:Example.jpg
 
File:Example.jpg|''italic caption''
 
File:Example.jpg|on page "{{PAGENAME}}"
 
 
</gallery>
 
</gallery>
 +
</pre>
 +
'''Paramètres optionnels''' :
 +
* perrow : nombre d'images maximum par ligne,
 +
* widths : largeur maximale des image,
 +
* heights : hauteur maximale des images.
  
=== Optional gallery attributes ===
+
=== Exemple ===
The gallery tag itself takes several additional parameters, specified as attribute name-value pairs:
 
 
 
<pre><gallery {parameters}>
 
{images}
 
</gallery></pre>
 
 
 
* <code>caption={caption}</code>: sets a caption on the gallery.
 
* <code>widths={width}px</code>: sets the widths of the images, default 120px. ''Note the plural, width'''s'''''
 
* <code>heights={heights}px</code>: sets the (max) heights of the images.
 
* <code>perrow={integer}</code>: sets the number of images per row.
 
* <code>showfilename={anything}</code>: Show the filenames of the images in the individual captions for each image (1.17+)
 
 
 
Example:
 
 
 
Coding:
 
 
<pre>
 
<pre>
<gallery widths=60px heights=60px perrow=7 caption="sunflowers are groovy">
+
<gallery caption="Le titre de la galerie (optionnel)" perrow=5 widths=80
File:Example.jpg
+
Fichier:Wiki.png
File:Example.jpg
+
Fichier:Wiki.png|Une légende (optionnelle)
File:Example.jpg
+
Fichier:Wiki.png
File:Example.jpg
+
Fichier:Wiki.png|Une légende (optionnelle) avec un [[Accueil|lien]]
File:Example.jpg
+
Fichier:Wiki.png
File:Example.jpg
+
Fichier:Wiki.png
File:Example.jpg
+
Fichier:Wiki.png
File:Example.jpg
+
Fichier:Wiki.png
File:Example.jpg
 
File:Example.jpg
 
 
</gallery>
 
</gallery>
 
</pre>
 
</pre>
  
Result:
+
Ce qui rendra :
<gallery widths=60px heights=60px perrow=7 caption="sunflowers are groovy">
+
<gallery caption="Le titre de la galerie (optionnel)" perrow=5 widths=80 >
File:Example.jpg
+
Fichier:Wiki.png
File:Example.jpg
+
Fichier:Wiki.png|Une légende (optionnelle)
File:Example.jpg
+
Fichier:Wiki.png
File:Example.jpg
+
Fichier:Wiki.png|Une légende (optionnelle) avec un [[Accueil|lien]]
File:Example.jpg
+
Fichier:Wiki.png
File:Example.jpg
+
Fichier:Wiki.png
File:Example.jpg
+
Fichier:Wiki.png
File:Example.jpg
+
Fichier:Wiki.png
File:Example.jpg
 
File:Example.jpg
 
 
</gallery>
 
</gallery>
 +
{{Encart|align=center|couleur=green|titre=Aide  accessibilité|texte=Les galeries ne pouvant pas contenir d'alternative  textuelle (<code><nowiki>alt=</nowiki></code> ),  il est souhaitable d'écrire des légendes plus descriptives, ceci afin  d'aider les lecteurs n'ayant pas accès aux images qu'elles  contiennent.}}
  
== Linking to an image without displaying it ==
+
== Lier sans afficher l'image ==
=== Link to description page ===
+
=== lien à la page de description ===
If you put a colon (<code>:</code>) before <code>{{ns:image}}:</code>, the image will not be embedded and the link will lead to the description page of the file.
+
Si vous placez deux-points ''« ''':''' »'', l'image n'est pas affichée et le lien est affiché
 
+
<pre>
<nowiki>[[</nowiki>:{{ns:image}}:{{mediawiki:image_sample}}]]
+
[[:Fichier:wiki.png|]]
<nowiki>[[</nowiki>:{{ns:image}}:{{mediawiki:image_sample}}|Sunflowers]]
+
[[:Fichier:wiki.png|Logo WikiGenWeb]]
 
+
</pre>
results in
+
Rendra ceci :
 
 
[[:{{ns:image}}:{{mediawiki:image_sample}}]]
 
[[:{{ns:image}}:{{mediawiki:image_sample}}|Sunflowers]]
 
 
 
=== Link to another page ===
 
{{note|link '''does not work with''' thumb '''or''' frame.}}
 
This will make a 50px width picture with a link to the page [[MediaWiki]]:
 
 
 
<nowiki>[[</nowiki>File:Wiki.png|50px|link=MediaWiki]]
 
 
 
[[File:Wiki.png|50px|link=MediaWiki]]
 
 
 
=== Link directly to the media file ===
 
You can use the pseudo-namespace “{{ns:media}}” to link directly to a file without rendering it, bypassing the description page.
 
 
 
<nowiki>[[</nowiki>{{ns:media}}:{{mediawiki:image_sample}}]]
 
<nowiki>[[</nowiki>{{ns:media}}:{{mediawiki:image_sample}}|Sunflowers]]
 
 
 
results in
 
 
 
[[{{ns:media}}:{{mediawiki:image_sample}}]]
 
[[{{ns:media}}:{{mediawiki:image_sample}}|Sunflowers]]
 
 
 
You can also use:&nbsp;
 
 
 
<nowiki>[[</nowiki>{{#special:Filepath}}/{{mediawiki:image_sample}}]]
 
 
 
which can be used to link to a potential file, even if it doesn't exist. You can also use:
 
 
 
<nowiki>{{</nowiki>FILEPATH:{{mediawiki:image_sample}}<nowiki>}}</nowiki>
 
 
 
which generates an external URL to the file inline: {{FILEPATH:{{mediawiki:image_sample}}}}
 
  
== Requisites ==
+
[[:Fichier:wiki.png|wiki.png]]
Before using images in your page, the system administrator of your wiki must have {{mediawiki|Manual:Configuring file uploads|enabled file uploads}} and a user has to [[Help:Managing files|upload the file]]. System administrators may also set the wiki to accept files from {{mediawiki|Manual:Image Administration#Foreign Repositories|foreign repositories}}, such as the [http://commons.wikimedia.org/wiki/Main_Page Wikimedia Commons]. For server side image resizing it is necessary to have a scaler configured (such as GD2, ImageMagick, etc.).
 
  
== Files at other websites ==
+
[[:Fichier:wiki.png|Logo WikiGenWeb]]
You can link to an external file available online using the same syntax used for linking to an external web page.  With these syntaxes, the image will not be rendered, but only the text of the link to this image will be displayed.
 
<pre>[http://url.for/some/image.png]</pre>
 
  
Or with a different displayed text:
+
=== Lien vers une autre page ===
<pre>[http://url.for/some/image.png link text here]</pre>
+
Cette option ne fonctionne pas avec '''thumb''' et '''frame'''
 +
<pre>[[Fichier:Wiki.png|50px|link=Accueil]]</pre>
 +
Rendra ceci :
  
Additional MediaWiki markup or HTML/CSS formatting (for inline elements) is permitted in this displayed text (with the exception of embedded links that would break the surrounding link):
+
[[Fichier:Wiki.png|50px|link=Accueil]]
<pre>[http://www.example.com/some/image.png Example '''<del>rich</del>''' ''<ins>link text</ins>'' here.]</pre>
 
which renders as: [http://www.example.com/some/image.png Example '''<del>rich</del>''' ''<ins>link text<ins>'' here.]
 
  
If it is enabled on your wiki (see {{mediawiki|Manual:$wgAllowExternalImages}}), you can also embed external images. To do that, simply insert the image's url:
+
=== Lien direct vers un media ===
<pre>http://url.for/some/image.png</pre>
+
Vous  pouvez utiliser le pseudo espace de noms ''« media »'' pour lier  directement au fichier sans le rendu et sans la page de description
Currently, embedded images cannot be resized, but they may be formatted by surrounding MediaWiki markup or HTML/CSS code.
+
<pre>[[media:wiki.png|]]</pre>
 +
rendra ceci :
  
If this wiki option is not enabled, the image will not be embedded but rendered as a textual link to the external site, just like above.
+
[[media:wiki.png|wiki.png]]
  
 +
Vous pouvez aussi utiliser la page spéciale ''« filepath »''
 +
<pre>[[Special:filepath/wiki.png|Wiki.png]]</pre>
 +
rendra ceci :
  
 +
[[Special:filepath/wiki.png|wiki.png]]
  
 +
Vous pouvez aussi utiliser le mot magique '''FILEPATH''' qui indiquera le chemin complet de l'image.
 +
<pre>{{FILEPATH:wiki.png}}</pre>
 +
Rendra ceci :
  
 +
{{FILEPATH:wiki.png}}
  
 
{{Palette aide}}
 
{{Palette aide}}
 
[[Catégorie:Aide|{{PAGENAME}}]]
 
[[Catégorie:Aide|{{PAGENAME}}]]

Version actuelle en date du 21 avril 2011 à 21:13

Il est possible de téléverser des images et des fichiers sur le serveur WikiGenWeb puis de les insérer dans les pages de différentes manières.

Depuis les dernières versions de Médiawiki, tout est nommé « Fichier », que ce soit images, fichiers pdf ou autres fichiers.

Pour utiliser une image, elle doit d'abord avoir été téléversée sur le serveur.

Téléversement

Procédure

Se référer à l'article : Téléverser un fichier

Fichiers supportés

Les seuls fichiers supportés en téléversement sont:

  • Fichiers PDF
  • Images JPG et JPEG
  • Images GIF
  • Images PNG

Tout téléversement d'un autre type de fichier sera refusé.

Afficher un fichier

Pour afficher un fichier stocké sur WikiGenWeb il faut utiliser le préfixe de l'espace de nom : « Fichier: ». Le préfixe « Image: » est encore supporté mais il est préférable de ne pas l'utiliser.

Syntaxe

la syntaxe complète pour afficher une image est:

[[Fichier:''fichier.extension''|''options''|''légende'']]

options est un paramètre facultatif et doit être un des suivants, chacun séparé de l'autre par un pipe (« | ») :

  • Option Format : une des valeurs frameless, frame, thumb ( sans cadre, avec cadre, vignette);
    Contrôle la façon dont l'image rendue est formatée et placée dans le reste de la page.
  • Option Redimensionnement : une des valeurs
    • {width}px — Redimensionne l'image pour l'adapter à la largeur maximale donnée en pixels, sans restreindre sa hauteur;
    • x{height}px — Redimensionne l'image pour l'adapter à une hauteur maximale donnée en pixels, sans restreindre sa largeur;
    • {width}x{height}px — Redimensionne l'image pour l'adapter à la largeur et à la hauteur en pixels;
    • upright — Redimensionne une image pour l'adapter à des dimensions raisonnables, selon les préférences de l'utilisateur (convient aux images dont la hauteur est supérieure à la largeur).
    Notez que l'image conservera toujours son ratio d'aspect.
  • Option Alignement Horizontal une des valeurs left, right, center, none;
    Contrôle l'alignement horizontal (en ligne ou en bloc flottant) de l'image dans un texte (aucune valeur par défaut).
  • Option Alignement Vertical: une des valeurs baseline, sub, super, top, text-top, middle, bottom, text-bottom;
    Contrôle l'alignement vertical d'une image non-flottante en ligne avec le texte avant ou après l'image et dans le même bloc (l'alignement vertical par défaut est middle).
  • Option Link: une des valeurs
    • link={cible} — Permet de changer la cible (un titre de page ou une URL) du lien généré, activable par un clic sur l'image;
    • link= (sans lien) — Affiche une image sans lien ; e.g. [[Fichier:wiki.png|20px|link=]] affichera Wiki.png.
Ce paramètre ne fonctionne pas avec les formats « thumb » ou « frame ».
  • Autres options spécifiques :
    • alt={Texte alternatif} — définit le texte alternatif lorsque l'image ne peut pas être rendue (Accessibilité aux mal-voyants).
    • page={numéro} — Affiche la page spécifiée par numéro. Ne s'utilise qu'avec les fichiers PDF.

Les options peuvent être données dans n'importe quel ordre. Si les options données sont en conflit les unes avec les autres, la dernière est appliquée, sauf pour l'« option Format » où les options ont la priorité dans l'ordre cadre, vignette, sans cadre et border. Si un paramètre ne correspond à aucune des possibilités, il est supposé être le texte de la légende. La légende ne sera affichée qu'avec les formats avec cadre et peut contenir des liens wiki et autres mises en forme.

Si aucun texte de légende est fourni, une légende est automatiquement créée avec le nom du fichier. Pour supprimer complètement la légende, il faut la mettre à : <span title=""></span>.

Par example, [[Fichier:Wiki.png|20px|<span title=""></span>]] rendra ceci .

Format

Effet des différents formats :

Description Wikitext Rendu
Aucun formatage
texte texte texte [[Fichier:wiki.png|50px]] texte texte texte
texte texte texte Wiki.png texte texte texte
Bordure
texte texte texte [[Fichier:wiki.png|border|50px]] texte texte texte
texte texte texte Wiki.png texte texte texte
Cadre
texte texte texte [[Fichier:wiki.png|frame|50px]] texte texte texte
texte texte texte
Wiki.png
texte texte texte
Pas de cadre
texte texte texte [[Fichier:wiki.png|frameless|50px]] texte texte texte
texte texte texte Wiki.png texte texte texte
Vignette
texte texte texte [[Fichier:wiki.png|thumb|50px]] texte texte texte
texte texte texte
Wiki.png
texte texte texte

Taille et bordure

Parmi les différents formats, l'effet du paramètre de taille peut être différent, comme le montrent les exemples ci-dessous.

Lorsque le format n'est pas spécifié, ou seulement border, la taille peut être à la fois réduite et élargie à toute taille spécifiée.

  • Dans les exemples ci-dessous, la taille originale de l'image est de 135x135 pixels.
  • Une image avec cadre frame ignore toujours les spécifications de taille, l'image d'origine sera réduite si elle dépasse la taille maximale définie dans les préférences utilisateur.
  • La taille d'une image avec thumb peut être réduite, mais ne peut pas être élargie au-delà de la taille d'origine de l'image.
Format Réduit Agrandi
Sans format
[[Fichier:wiki.png|30px]]
Wiki.png
[[Fichier:wiki.png|250px]]
Wiki.png
Border
[[Fichier:wiki.png|border|30px]]
Wiki.png
[[Fichier:wiki.png|border|250px]]
Wiki.png
Avec cadre
[[Fichier:wiki.png|frame|30px]]
Wiki.png
[[Fichier:wiki.png|frame|250px]]
Wiki.png
Vignette
[[Fichier:wiki.png|thumb|30px]]
Wiki.png
[[Fichier:wiki.png|thumb|250px]]
Wiki.png
Sans cadre
[[Fichier:wiki.png|frameless|30px]]
Wiki.png
[[Fichier:wiki.png|frameless|250px]]
Wiki.png

Alignement horizontal

Notez que lorsque vous utilisez le format frame ou thumb, l'alignement par défaut est à droite.

Description wikitexte Rendu
Sans spécification
... text text text [[Fichier:wiki.png|30px|caption]] text text text ...
... text text text caption ... text text text ...
Spécification none
... text text text [[Fichier:wiki.png|none|30px|caption]] text text text ...
... text text text
caption
... text text text ...
Spécification center
... text text text [[Fichier:wiki.png|center|30px|caption]] text text text ...
... text text text
caption
... text text text ...
Spécification left
... text text text [[Fichier:wiki.png|left|30px|caption]] text text text ...
... text text text
caption
... text text text ...
Spécification right
... text text text [[Fichier:wiki.png|right|30px|caption]] text text text ...
... text text text
caption
... text text text ...

Alignement vertical

Les options d'alignement vertical ne prendront effet que si l'image est' rendue par un élément en ligne et n'est pas flottante. Elles modifient la façon dont l'image inline sera alignée verticalement avec le texte présent dans le même bloc avant et/ou après cette image sur la même ligne. Les différentes valeurs d'alignement vertical sont :

top 
haut de la ligne
text-top 
haut du texte
super 
bas du texte
baseline 
bas de ligne
sub 
bas d'indice
default 
milieu
middle 
milieu
text-bottom 
bas de texte
bottom 
bas de ligne
Description wikitexte Rendu
Sans spécification
... text text text [[Fichier:wiki.png|30px|caption]] text text text ...
... text text text caption ... text text text ...
default
... text text text [[Fichier:wiki.png|default|30px|caption]] text text text ...
... text text text caption ... text text text ...
middle
... text text text [[Fichier:wiki.png|middle|30px|caption]] text text text ...
... text text text caption ... text text text ...
top
... text text text [[Fichier:wiki.png|top|30px|caption]] text text text ...
... text text text caption ... text text text ...
text-top
... text text text [[Fichier:wiki.png|text-top|30px|caption]] text text text ...
... text text text caption ... text text text ...
super
... text text text [[Fichier:wiki.png|super|30px|caption]] text text text ...
... text text text caption ... text text text ...
baseline
... text text text [[Fichier:wiki.png|baseline|30px|caption]] text text text ...
... text text text caption ... text text text ...
sub
... text text text [[Fichier:wiki.png|sub|30px|caption]] text text text ...
... text text text caption ... text text text ...
text-bottom
... text text text [[Fichier:wiki.png|text-bottom|30px|caption]] text text text ...
... text text text caption ... text text text ...
bottom
... text text text [[Fichier:wiki.png|bottom|30px|caption]] text text text ...
... text text text caption ... text text text ...

Galerie d'images

WikiGenWeb offre la possibilité de faire des galeries d'images, avec une légende et un titre pour chaque image.

Syntaxe

<gallery  caption="Légende" perrow=<images par ligne> widths=<largeur  des images> heights=<hauteur des images> >
Fichier:Wiki.png
Fichier:Wiki.png|Une légende (optionnelle)
Fichier:Wiki.png
Fichier:Wiki.png|Une légende (optionnelle) avec un [[Accueil|lien]]
........
</gallery>

Paramètres optionnels :

  • perrow : nombre d'images maximum par ligne,
  • widths : largeur maximale des image,
  • heights : hauteur maximale des images.

Exemple

<gallery caption="Le titre de la galerie (optionnel)" perrow=5 widths=80
Fichier:Wiki.png
Fichier:Wiki.png|Une légende (optionnelle)
Fichier:Wiki.png
Fichier:Wiki.png|Une légende (optionnelle) avec un [[Accueil|lien]]
Fichier:Wiki.png
Fichier:Wiki.png
Fichier:Wiki.png
Fichier:Wiki.png
</gallery>

Ce qui rendra :

Aide accessibilité
Les galeries ne pouvant pas contenir d'alternative textuelle (alt= ), il est souhaitable d'écrire des légendes plus descriptives, ceci afin d'aider les lecteurs n'ayant pas accès aux images qu'elles contiennent.

Lier sans afficher l'image

lien à la page de description

Si vous placez deux-points « : », l'image n'est pas affichée et le lien est affiché

[[:Fichier:wiki.png|]]
[[:Fichier:wiki.png|Logo WikiGenWeb]]

Rendra ceci :

wiki.png

Logo WikiGenWeb

Lien vers une autre page

Cette option ne fonctionne pas avec thumb et frame

[[Fichier:Wiki.png|50px|link=Accueil]]

Rendra ceci :

Wiki.png

Lien direct vers un media

Vous pouvez utiliser le pseudo espace de noms « media » pour lier directement au fichier sans le rendu et sans la page de description

[[media:wiki.png|]]

rendra ceci :

wiki.png

Vous pouvez aussi utiliser la page spéciale « filepath »

[[Special:filepath/wiki.png|Wiki.png]]

rendra ceci :

wiki.png

Vous pouvez aussi utiliser le mot magique FILEPATH qui indiquera le chemin complet de l'image.

{{FILEPATH:wiki.png}}

Rendra ceci :

https://www.francegenweb.fr:80/wiki/images/b/bc/Wiki.png