External Image
Jump to navigation
Jump to search
To reference an external image and make sure it appears with a controllable parameter, one can reference this page on Stack overflow[1].
The original post by stack overflow user Brion is reproduced and the template has been created here:
The first step is to add one more line in LocalSettings.php
.
$wgAllowExternalImages = true;
Then, you need to have admin access to the MediaWiki site, so that you can edit the file:MediaWiki:Common.css
.
In MediaWiki:Common.css add:
.externalimage-holder {
position: relative;
}
.externalimage-holder img {
width: 100%;
height: auto;
}
Then, set up a Template in Template:Sized-external-image like this:
<div class="externalimage-holder" style="width:{{{1}}}">{{{2}}}</div>
Then, call it like this:
{{sized-external-image|250px|https://storage.cloud.google.com/pub_papers/GitiFactory.png}}
Then, it should show up as follows: