How do you hot link an external image from a Media Wiki site?

Your example [http://example.com/image.jpg] is correct.

You will need to enable this by setting $wgAllowExternalImages to true in your configuration file. The default is false. Optionally, you can set $wgAllowExternalImagesFrom to allow exceptions while $wgAllowExternalImages remains set to false. You can also use $wgEnableImageWhitelist to allow exceptions based upon regular expressions.

You will likely need to copy the appropriate line from DefaultSettings.php to LocalSettings.php.

Here are some links (in order):

  • http://www.mediawiki.org/wiki/Manual:LocalSettings.php

  • http://www.mediawiki.org/wiki/Manual:Configuration_settings

  • http://www.mediawiki.org/wiki/Manual:$wgAllowExternalImages

  • http://www.mediawiki.org/wiki/Manual:$wgAllowExternalImagesFrom

  • http://www.mediawiki.org/wiki/Manual:$wgEnableImageWhitelist


Actually, [http://example.com/image.jpg] is not correct.

The correct way to insert an external image into a wikimedia page is http://example.com/image.jpg eg. no square brackets.

Of course, make sure that you have added $wgAllowExternalImages = true to your configuration file to enable display of the image, as wikimedia defaults to not allowing externally hosted images.