|URLs and file paths: $wgLogos|
|The URL path to various wiki logos.
|Introduced in version:||1.35.0 (Gerrit change 562588; )|
|Removed in version:||still in use|
|Allowed values:||(array of factors and relative paths or urls)|
(Note: The default value of this variable depends on other variables, such as the values set in Setup.php, after LocalSettings.php is executed)
|Other settings: Alphabetical | By function|
An array with factors and their associated relative paths or URL paths to the different versions of the wiki logo. (i.e. the image displayed in the upper-left corner of the page in most MediaWiki installations).
- The icon version should be a square and should maximally have 50x50 pixels.
- The 1.x version should be a square and should maximally have 135x135 pixels.
- The 1.5x version should be a square and should maximally have 202x202 pixels.
- The 2x version should be a square and should maximally have 270x270 pixels.
- The svg version should be a square.
There are also two optional fields for additional assets to show next to the logo:
- The wordmark should be a landscape logo, with maximum set width or height, as these are specified under the
heightkeys. Typically this is the graphic version of $wgSitename.
- The same is true for the tagline, which typically corresponds to the non-sitename part of MediaWiki:Tagline.
All values (except
height) can either be a fully-qualified URL or a relative path from DOCUMENT_ROOT.
If it's a relative path, it has to start with a slash (a file in DOCUMENT_ROOT is /file.png, not file.png).
Note that if you use a bigger image, MediaWiki will not resize this image!
Instead, the image will be cut off so that only part of it (the upper left-hand corner to be precise) will be visible.
If this corner is completely white, it might look like the image would not display although in fact it does.
$wgLogos = [ '1x' => "path/to/1x_version.png", '1.5x' => "path/to/1.5x_version.png", '2x' => "path/to/2x_version.png", 'svg' => "path/to/svg_version.svg", 'icon' => "path/to/icon.png", // A version of the logo without wordmark and tagline 'wordmark' => [ 'src' => "path/to/wordmark_version.png", '1x' => "path/to/wordmark_version.svg", // optional if you want to support browsers with SVG support with an SVG logo. 'width' => 135, 'height' => 20, ], 'tagline' => [ 'src' => "path/to/tagline_version.png", 'width' => 135, 'height' => 15, ], ];
Depending on your server settings, the information on which image to use may be cached inside a server cache. Also, images may be cached inside the web browser for a long time so that you do not immediately see the new logo, if you changed the according image file. In this case it might be necessary to especially empty caches and to reload the image URL in your web browser so that the browser downloads the current version from the server.
|Caution:|| Do not simply overwrite the default logo installed with MediaWiki (|