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.
Pour utilsier utiliser une image, elle doit d'abord avoir été [[Aide:Importer un fichier|téléversée sur le serveur]].
== Téléversement ==
== 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.
=== Syntaxe ===
*: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
** ''{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|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|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 ''[[#Modification de la cible du lien par défaut|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. <code><nowiki>[[</nowiki>Fichier:wiki.png|20px|link=]]</code> affichera [[Fichier:wiki.png|20px|link=]].
: 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 à : <code><nowiki><span title=""></span></nowiki></code>.
Par example, <code><nowiki>[[Fichier:Wiki.png|20px|<span title=""></span>]]</nowiki></code> rendra ceci [[Fichier:Wiki.png|20px|<span title=""></span>]].
=== Format ===
The following table shows the effect of all available Effet des différents formats.:{|class="wikitable plainlinks-center"
|-
!Description
!You typeWikitext!You getRendu{{Help|-|Aucun formatage|<pre>texte texte texte [[Fichier:Imageswiki.png|50px]] texte texte texte</framepre>|frame=texte texte texte [[Fichier:wiki.png|ex=no format specified50px]] texte texte texte|float=no-|inline=yes}}Bordure{{Help|<pre>texte texte texte [[Fichier:Imageswiki.png|border|50px]] texte texte texte</framepre>|texte texte texte [[Fichier:wiki.png|frame=border|ex='''border''' results in a very small gray border50px]] texte texte texte|float=no-|inline=yes}}Cadre{{Help|<pre>texte texte texte [[Fichier:Imageswiki.png|frame|50px]] texte texte texte</framepre>|texte texte texte [[Fichier:wiki.png|frame=frameless|ex='''frameless''', like thumbnail, respect user preferences for image width, but without border and no right float50px]] texte texte texte|float=no-|inline=yes}}Pas de cadre{{Help|<pre>texte texte texte [[Fichier:Images/framewiki.png|frame=frameless|2=border50px]] texte texte texte</pre>|texte texte texte [[Fichier:wiki.png|ex='''frameless''' and '''border'''|float=no50px]] texte texte texte|inline=yes}}-{{Help:Images/frame|frame=frameVignette|ex='''frame'''<pre>texte texte texte [[Fichier:wiki.png|float=yesthumb|inline=no}}50px]] texte texte texte</pre>{{Help|texte texte texte [[Fichier:Images/frame|frame=thumbwiki.png|ex='''thumb''' or '''thumbnail'''|float=yes|inline=no}}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>Parmi les différents formats, you can use a different image for the thumbnaill'effet du paramètre de taille peut être différent, comme le montrent les exemples ci-dessous.
=== Taille et bordure ===Among different formats, the effect of the size parameter may be different, as shown below.* For how it appears when its size is not specified, see [[#Format|Format]] section above.* When the Lorsque le format is not specifiedn'est pas spécifié, or only ou seulement <code>border</code>ed, the size can be both reduced and enlarged to any specified sizela taille peut être à la fois réduite et élargie à toute taille spécifiée.* In the examples belowDans les exemples ci-dessous, the original size of the la taille originale de l'image is 400 × 267 est de 135x135 pixels.* An Une image with avec cadre <code>frame</code> always ignores the size specificationignore toujours les spécifications de taille, the original l'image will be reduced if it exceeds the maximum size defined in user preferencesd'origine sera réduite si elle dépasse la taille maximale définie dans les préférences utilisateur.* The size of an La taille d'une image with avec <code>thumb</code> can be reducedpeut être réduite, but can not be enlarged beyond the original size of the mais ne peut pas être élargie au-delà de la taille d'origine de l'image. {|class="wikitable-center"|-! Format !! Réduit!! Agrandi|-|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|<pre>[[Fichier:Imageswiki.png|frameless|30px]]</sizepre>[[Fichier:wiki.png|frame=}}frameless|30px]]{{Help|<pre>[[Fichier:Images/sizewiki.png|frame=border}}{{Help:Images/sizeframeless|frame=frame}}{{Help:Images250px]]</size|frame=thumb}}{{Helppre>[[Fichier:Images/sizewiki.png|frame=frameless}}|250px]]
|}
=== 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>.
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
!You typewikitexte!You getstyle="width:100px" |Rendu|-|Sans spécification{{Help|<pre>... text text text [[Fichier:Images/framewiki.png|2=100px30px|frame=caption]] text text text ...</pre>|ex='''no horizontal alignment specified''', or default alignment... text text text [[Fichier:wiki.png|inline=yes30px|float=no}}caption]] ... text text text ...{{Help:Images/frame|2=100px-|frame=Spécification none|ex=specify horizontal alignment as<pre>... text text text [[Fichier: '''wiki.png|none'''|inline=no30px|float=no}}caption]] text text text ...</pre>{{Help|... text text text [[Fichier:Images/framewiki.png|30px|none|caption]] ... text text text ...|2=100px-|frame=Spécification center|ex=specify horizontal alignment as<pre>... text text text [[Fichier: '''wiki.png|center'''|inline=no30px|float=no}}caption]] text text text ...</pre>{{Help|... text text text [[Fichier:Images/framewiki.png|30px|center|caption]] ... text text text ...|2=100px-|frame=Spécification left|ex=specify horizontal alignment as<pre>... text text text [[Fichier: '''wiki.png|left'''|inline=no30px|float=yes}}caption]] text text text ...</pre>{{Help|... text text text [[Fichier:Images/framewiki.png|30px|left|caption]] ... text text text ...|2=100px-|frame=Spécification right|ex=specify horizontal alignment as<pre>... text text text [[Fichier: '''wiki.png|right'''|inline=no30px|caption]] text text text ...</pre>|... text text text [[Fichier:wiki.png|30px|right|float=yes}}caption]] ... text text text ...
|}
=== 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="borderLes 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 :1px solid #AAA;backgroundtop :#FF0haut de la ligne;paddingtext-top :0haut du texte;font-sizesuper : bas du texte;baseline :150%bas de ligne;line-heightsub :2">bas d'indice<span style="background;default :#FFFmilieu;colormiddle :#000milieu ;text-decorationbottom :overline"><u><del>text</del>bas de texte<sup>'''super;bottom :'''</sup> [[File:Example.jpg|20px|super]] [[File:Example.jpg|40px|super]] [[File:Example.jpg|40px|border|super]]<del>text</del></u></span></p>bas de ligne
<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>Galerie d'''baseline:''' [[File:Example.jpg|20px|baseline]] [[File:Example.jpg|40px|baseline]] [[File:Example.jpg|40px|border|baseline]]images ==<del>text</del></u></span></p>{{Construction}}
<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>Lier sans afficher l'''bottom:''' [[File:Example.jpg|20px|bottom]] [[File:Example.jpg|40px|bottom]] [[File:Example.jpg|40px|border|bottom]]<del>text</del></u></span></p> Notes:# 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:#* 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 lien à 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!You type!You get{{Help:Images/frame|2=link=Main Page|ex=internal link}}{{Help:Images/frame|2=link=http://wikipedia.org|ex=external link}}{{Help:Images/frame|2=link=|ex=no link (external or file page)}}|} '''Warning :''': 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).: 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 de 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 == === Gallery syntax ===ItSi vous placez deux-points 's easy to make a gallery of '« ''thumbnails only''', not other images, with the <code><nowiki><gallery></nowiki></code> tag. The syntax is: <nowiki><gallery></nowiki> Image:file_name.ext|caption Image:file_name.ext|caption {...} </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 1File:Example.jpg|a link to [[Help:Contents]]File:Example.jpgFile:Example.jpgFile:Example.jpg|''italic caption'»'File:Example.jpg|on page "{{PAGENAME}}"</gallery> === Optional gallery attributes ===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, widthl'image n''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:est pas affichée et le lien est affiché
<pre>
<gallery widths=60px heights=60px perrow=7 caption="sunflowers are groovy">File:Example.jpgFile:Example.jpgFile:Example.jpgFile:Example.jpgFile:Example.jpgFile:Example.jpgFile[[:Example.jpgFileFichier:Examplewiki.jpgpng|]]File[[:Example.jpgFileFichier:Examplewiki.jpg</gallery>png|Logo WikiGenWeb]]
</pre>
Rendra ceci :
Result:<gallery widths=60px heights=60px perrow=7 caption="sunflowers are groovy">File:Example.jpgFile:Example.jpgFile:Example.jpgFile:Example.jpgFile:Example.jpgFile:Example.jpgFile:Example.jpgFile:Example.jpgFile:Example.jpgFile:Example.jpg</gallery> == Linking to an image without displaying it ===== Link to description page ===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. <nowiki>[[</nowiki>:{{ns:image}}:{{mediawiki:image_sample}}]] <nowiki>[[</nowiki>:{{ns:image}}:{{mediawiki:image_sample}}|Sunflowers]] results in [[:{{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>FileFichier:Wikiwiki.png|50px|link=MediaWiki]] [[File:Wikiwiki.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: <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[[: {{FILEPATHFichier:{{mediawiki:image_sample}}}}wiki.png|Logo WikiGenWeb]]
== Requisites = Lien vers une autre page ===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 Cette option ne fonctionne pas avec '''thumb''' et '''frame'''<pre>[[HelpFichier:Managing filesWiki.png|50px|upload the filelink=Accueil]]. System administrators may also set the wiki to accept files from {{mediawiki|Manual:Image Administration#Foreign Repositories|foreign repositories}}, such as the [http</pre>Rendra ceci ://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 == 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[Fichier://url.for/some/imageWiki.png|50px|link=Accueil]]</pre>
Or with a different displayed text:=== 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<pre>[http[media://url.for/some/imagewiki.png link text here]]</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):<pre>[http[media://www.example.com/some/imagewiki.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 imageVous pouvez aussi utiliser l'option ''« filepath »''s url:<pre>http[[Special:filepath//urlwiki.for/some/imagepng|Wiki.png]]</pre>Currently, embedded images cannot be resized, but they may be formatted by surrounding MediaWiki markup or HTML/CSS code.rendra ceci :
If this [[Special:filepath/wiki option is not enabled, the image will not be embedded but rendered as a textual link to the external site, just like above.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}}
[[Catégorie:Aide|{{PAGENAME}}]]
[[Catégorie:Nouvel article|{{PAGENAME}}]]