: How do you hot link an external image from a Media Wiki site? What is the syntax for showing an externally hosted image in a media wiki page? The media wiki help page doesn't seem to cover
What is the syntax for showing an externally hosted image in a media wiki page? The media wiki help page doesn't seem to cover that scenario.
I've tried several things that don't work:
[http://example.com/image.jpg]
[[File:http://example.com/image.jpg]]
<img src="http://example.com/image.jpg">
More posts by @BetL925
2 Comments
Sorted by latest first Latest Oldest Best
Actually, [http://example.com/image.jpg] is not correct.
The correct way to insert an external image into a wikimedia page is 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.
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):
www.mediawiki.org/wiki/Manual:LocalSettings.php http://www.mediawiki.org/wiki/Manual:Configuration_settings www.mediawiki.org/wiki/Manual:$wgAllowExternalImages http://www.mediawiki.org/wiki/Manual:$wgAllowExternalImagesFrom www.mediawiki.org/wiki/Manual:$wgEnableImageWhitelist
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.