So I have the code [[File:example.jpg|thumb|caption]]. This works fine for local images and files, but I want to host some images externally. I can't just replace example.jpg with a link though, because it still thinks it's a local file.


1 Answer 1


According to this Stack Overflow answer, resizing external images using features such as thumb cannot be done.

From the MediaWiki manual:

For resizing images in mediawiki they need to have a row in image table of database containing dimensions and other information of image so you can't resize external images.

This answer suggests resizing your image in CSS, as a workaround:

If client-side resizing is sufficient, you could probably whip something up with CSS...

Wrap the image you want to resize in a div or span and give it a particular class like:

<div class="image100px">http://example.com/path/to/image.jpeg</div>

And in the [[MediaWiki:Common.css]] page on the wiki add an entry like this:

.image100px img { width: 100px; }

(Note that due to caching of the CSS you might have to force a reload to see the update.)

However, that won't get you the nice caption box.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.