Manual:リンク付き画像
MediaWiki の画像は既定で説明ページにリンクされ、利用者が画像をクリックすると、ライセンス情報、アップロード履歴、投稿者、フル解像度のバージョンをすぐに利用できます。
しかし、それを必要とする人にはいくつかの回避策があります。
バージョン1.14からlink=構文が利用可能になりました。
画像から直接内部または外部へのリンクは、Help:画像 で説明されている構文で可能です。
In your wikicode:
[[Image:Wiki.png|50px|link=MediaWiki]]
This will make a 50px width picture with a link to the page MediaWiki:
If you put the link empty, the image will no longer be clickable.
[[Image:Wiki.png|50px|link=]]
External image syntax
If you enable $wgAllowExternalImages (which allows external images from any domain) or $wgAllowExternalImagesFrom (which restricts the list of domains), anyone can then easily create an "external" link to an "external" image. External simply means: using the full URL rather than a local link, so you can link locally, but you need to use the full URL. The plainlinks class is used to remove the "external link" icon:
After enabling $wgAllowExternalImages , you can also embed an image by simply typing the URL of the image.
For example,https://domain.com/images/image_file.pngwill display the image on screen.
<span class="plainlinks">[https://linktopage https://linktoimage]</span>
So for example, were external images allowed here, you could link to the main page with https://upload.wikimedia.org/wikipedia/mediawiki/b/bc/Wiki.png using wikicode like:
<span class="plainlinks">[{{fullurl:MediaWiki}} https://upload.wikimedia.org/wikipedia/mediawiki/b/bc/Wiki.png]</span>
This has the disadvantage of not registering the link, or the image use, as well as not being easily portable to forks and mirrors.
Raw HTML
If you enable $wgRawHtml , you can use <img>
tags freely, but this method is highly insecure.
On newer MediaWiki you can use the Manual:$wgAllowImageTag (1.35 で廃止予定) option which allows <img> and is more secure than raw html.
There are, however, some extensions to make it safer, see Manual:$wgRawHtml for details.
ImageMap extension
Extension:ImageMap can be deployed to enable more advanced customization of where an image links to, such as specific pixels pointing to specific places.