Manual:$wgAllowExternalImages/fr

Autoriser ou non les images en ligne hébergées sur des sites Web externes, parfois appelées liens en ligne.

Détails
Lorsqu'il est défini sur, les utilisateurs peuvent importer une image intégrée à partir d'une URL externe. Ils le font simplement en collant l'URL complète dans le texte du wiki (sans qu'aucun autre balisage environnant ne soit requis). C'est l'URL directe d'une ressource d'image sur un autre site Web.

Lorsqu'elle est définie sur, l'URL complète apparaît sous la forme d'un lien texte vers l'image.

Notez que si vous souhaitez autoriser les images provenant d'une seule source de confiance (par exemple, de votre propre domaine), définissez-le sur false et utilisez $wgAllowExternalImagesFrom.

Exemple
Utiliser wikitext :

Résultat : https://en.wikipedia.org/upload/b/bc/Wiki.png

Vignettes des images externes
Les images miniatures sont générées à partir des images téléchargées en utilisant les informations de dimension dans la base de données de MediaWiki. Les images externes ne comportant aucune entrée dans la base de données MediaWiki, il est impossible de créer des vignettes.

Si ces images ont été téléchargées dans un autre MediaWiki ou si elles se trouvent quelque part dans votre site et que vous voulez laisser MediaWiki en créer des vignettes, vous pouvez définir $wgUseSharedUploads sur true et mettre $wgSharedUploadPath et $wgSharedUploadDBname au lieu d'activer les images externes.

Pourquoi autoriser les images externes ?
Les utilisateurs qui savent comment obtenir l'URL directe d'une image peuvent trouver cela très utile pour ajouter des illustrations à des articles wiki, en utilisant des ressources d'image disponibles ailleurs sur le Web.

Sans cette fonctionnalité, les utilisateurs sont obligés de télécharger toute image qu’ils souhaitent incorporer directement dans un article. Le téléchargement est (à bien des égards) plus fastidieux. Il utilise également l’espace disque et la bande passante sur le serveur Web du wiki. Il existe de nombreuses utilisations légitimes des images en ligne.

De plus, cela permet d'incorporer des images externes qui « changent » de temps en temps, ou sont générées sur demande, comme des graphiques à partir d'un logiciel de surveillance tel que Cacti, si les images peuvent être identifiées comme des fichiers image. Si l'incorporation est activée, il est également possible de créer des liens vers des images incorporées en utilisant la syntaxe [Lien_URL_Image_à_intégrer], ce qui provoquera des clics sur l'image vers Lien_URL.

(MediaWiki ne reconnaîtra que les URL d'image avec des extensions de fichier image ; vous devrez peut-être ajouter un paramètre 'fake' à la fin de certaines URL, comme "&junk=junk.png" ou "?.Png" pour forcer l'analyseur à réaliser Image_URL pointe réellement sur une image, de sorte qu'il l'intégrera.)

Pourquoi interdire les images externes ?
Inline external images are disallowed on across many wikimedia projects, and MediaWiki has AllowExternalImages set to false by default since version 1.6.9. The reasons for this are:

To prevent malicious gathering of browser data. Every time your browser fetches an image (or a web page for that matter) it also submits various bits of data to the webserver in its request. This includes your IP address, the URL of the page you were looking at (the wiki site), and cookies (information about previous requests to that same webserver).

Now with external images enabled, a user can be fetching images from other webservers. A malicious (or devious) person could make wiki edits to set up an external image URL on your wiki, purely for the purpose of gathering this data about your visitors. No need to panic! They wouldn't get credit card numbers or anything, just the kind of data that is sent every time you visit a website. But this might allow them to build up a (rather fuzzy) picture about visitors to your site, which might be correlated with similar data from other sites, and could potentially give rise to privacy concerns. It's the kind of data that has a value to marketing companies, a list saying "The person on this IP address is interested in this kind of website"

An image URL added for this purpose, is an abuse of your wiki, which (unless you disallow it) you will need to look out for along with more conventional Wiki Spam attacks. Note that the actual image could be a miniscule 1x1 pixel images, and so as with wiki spam, you won't necessarily see it on the page itself, but you will see the edit on your 'recent changes'. Conventional Anti-spam features (such $wgSpamRegex) will counter these kinds of URL along with normal link spam.

To prevent (or reduce the impact of) certain types of vandalism. People can still upload offensive images to your wiki, but this option will prevent people inline linking to offensive images, which might make that kind of vandalism less prevalent. If you do allow external images, then removing abusive image links is always a matter of a simple wiki edit (followed by whatever conflict resolution/banning action you wish to take)

To prevent "bandwidth theft" from other sites. A wiki administrator might wish to avoid being accused of bandwidth theft due to inline linking.

This is only of concern in cases where your wiki is linking to a web server/host belonging to somebody else, and that person was not involved or consulted in setting up the link (a wiki edit) In that situation the person might object to such links. Of course removing the link is as simple as editing the wiki, but it should be noted that inline linking in this kind of situation is widely regarded as bad netiquette (even if you are very happy to remove on demand).

In many other situations, bandwidth theft is not a concern:
 * There are some websites which explicitly encourage inline linking to images they host (note that sometimes terms & conditions are attached to inline linking e.g. they require a textual link/acknowledgement)
 * A contributor might decide that images they are hosting on their own website could appear on a wiki page, and so they set up the inline link themselves.
 * Often it might be useful to allow inline linking to images hosted on the very same webserver as the wiki (which are just not uploaded into the wiki), or images hosted as part of the same overall project/organisation. (You could use $wgAllowExternalImagesFrom to specify this as an exception instead)

To prevent "link rot". An image on another site may have been valid when a wiki article was originally created, but there is no guarantee that an independent external site will remain up, with the same content at the same URL, in the future. Any change in the design of the external site has the potential to break external links to individual files on that site. The same problem exists for textual hyperlinks of course, but for broken image references you will wind up with an ugly error box if the link is broken.

To ensure you are hosting all resources. You might wish to disallow inline linking in order to ensure that all images resources appearing on your wiki, are available from your wiki. If you have good hosting bandwidth, you might want to make full use of this and avoid any slowdown in browsing experience due to images being fetched from elsewhere. You might also want to ensure you are gathering all the image resources locally, in order to offer up all your content as a download.

For consistency in handling images. Uploaded images are added to a wiki page using a different wiki syntax. Having two different syntaxes and two different approaches to adding images, could cause confusion for some novice users. If you disallow external images, users must always follow the same upload procedure, and use the same syntax. Also it means images always have the same click behaviour (taking you to the image page)

Image caption
You cannot easily put image caption for external images. One solution is by using a table.

Voir aussi

 * - Allow using html-style  tags. Useful to resize images, etc.. Only available for MW 1.17+
 * - Only allow external images from a given source or sources.
 * - Enable an on-wiki page to define what external images are allowed.
 * - Enable using images from Wikimedia Commons.