MediaWiki: Parameters for external images

907 Views Asked by At

I'm trying to set some parameters (e.g. size, alignment) for external images on my MediaWiki.

I have both $wgAllowExternalImages and $wgAllowImageTag set to true, but it still doesn't work. Trying

[[Image:https://upload.wikimedia.org/wikipedia/commons/a/a0/Sega-Genesis-Model2-32X.jpg|50px]]

or

[[File:Sega-Genesis-Model2-32X.jpg|link=https://upload.wikimedia.org/wikipedia/commons/a/a0|caption]]

doesn't work.
Just displaying images, without setting any parameters, works by https://upload.wikimedia.org/wikipedia/commons/a/a0/Sega-Genesis-Model2-32X.jpg.

However, everything works with internal images.

Sources: Help:Images - MediaWiki

1

There are 1 best solutions below

0
On

Your use case is an image on Wikimedia Commons, which is not an external image but an image from a foreign repo. Just enable InstantCommons (and make sure your thumbnailer is configured, of course).

$wgUseInstantCommons = true;

Then use the image as a local one:

[[Image:Sega-Genesis-Model2-32X.jpg|50px]]