Manual:$wgLogos

Other languages:
English • ‎русский • ‎日本語
URLs and file paths: $wgLogos
The URL path to various wiki logos.
Introduced in version:1.35.0 (Gerrit change 562588; git #8cd2e133)
Removed in version:still in use
Allowed values:(array of factors and relative paths or urls)
Default value:[ '1x' => $wgLogo ]/[ '1x' => "{$wgScriptPath }/resources/assets/wiki.png" ]
(Note: The default value of this variable depends on other variables, such as the values set in Setup.php , after LocalSettings.php is executed)

DetailsEdit

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).

Supported variantsEdit

  • 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.
  • The wordmark should be a landscape logo, with maximum set width or height, as these are specified under the width and height keys.

All values (except width and 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.

ExampleEdit

$wgLogos = [
	'icon' => "path/to/icon.png",
	'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",
	'wordmark' => [
		'src' => "path/to/wordmark_version.png",
		'1x' => "path/to/wordmark_version.svg", // optional if you want to support browsers without SVG support with an SVG logo.
		'width' => 135,
		'height' => 65
	]
];
  Caution: Do not simply overwrite the default logo installed with MediaWiki (/resources/assets/wiki.png). This file will automatically be overwritten when you upgrade and your changes will be lost.

See alsoEdit