Manual:$wgGalleryOptions
Appearance
| Images: $wgGalleryOptions | |
|---|---|
Default settings for the <gallery> tag. |
|
| Introduced in version: | 1.17.0 (r63707) |
| Removed in version: | Still in use |
| Allowed values: | (associative array) |
| Default value: | see below |
| Other settings: Alphabetical | By function | |
Details
The default settings for the <gallery> tag, and galleries in categories.
See the "default value" below for the possible keys, and a description of each setting.
Some of these settings correspond, in a confusing way, to attributes that can be specified for the <gallery> tag itself.
See Help:Images#Optional gallery attributes for information on each of the attributes.
| This key in $wgGalleryOptions... | ...sets the default value for this <gallery> tag attribute
|
|---|---|
imagesPerRow |
perrow=
|
imageWidth |
widths=
|
imageHeight |
heights=
|
mode |
mode= (New in MediaWiki 1.22 – see Help:Images#Mode parameter for more information)
|
Default value
| MediaWiki version: | ≥ 1.30 |
$wgGalleryOptions = [
];
| MediaWiki version: | 1.29 |
$wgGalleryOptions = [
// Default number of images per-row in the gallery. 0 -> Adapt to screensize
'imagesPerRow' => 0,
// Width of the cells containing images in galleries (in "px")
'imageWidth' => 120,
// Height of the cells containing images in galleries (in "px")
'imageHeight' => 120,
// Length to truncate filename to in caption when using "showfilename".
// A value of 'true' will truncate the filename to one line using CSS
// and will be the behaviour after deprecation.
// @deprecated since 1.28
'captionLength' => true,
// Show the filesize in bytes in categories
'showBytes' => true,
'mode' => 'traditional',
];
| MediaWiki version: | 1.28 |
$wgGalleryOptions = [
'imagesPerRow' => 0, // Default number of images per-row in the gallery. 0 -> Adapt to screensize
'imageWidth' => 120, // Width of the cells containing images in galleries (in "px")
'imageHeight' => 120, // Height of the cells containing images in galleries (in "px")
'captionLength' => true, // Deprecated @since 1.28
// Length to truncate filename to in caption when using "showfilename".
// A value of 'true' will truncate the filename to one line using CSS
// and will be the behaviour after deprecation.
'showBytes' => true, // Show the filesize in bytes in categories
'mode' => 'traditional',
];
| MediaWiki versions: | 1.22 – 1.27 |
$wgGalleryOptions = [
'imagesPerRow' => 0, // Default number of images per-row in the gallery. 0 -> Adapt to screensize
'imageWidth' => 120, // Width of the cells containing images in galleries (in "px")
'imageHeight' => 120, // Height of the cells containing images in galleries (in "px")
'captionLength' => 25, // Length of caption to truncate (in characters)
'showBytes' => true, // Show the filesize in bytes in categories
'mode' => 'traditional',
];
| MediaWiki versions: | 1.18 – 1.21 |
$wgGalleryOptions = array(
'imagesPerRow' => 0, // Default number of images per-row in the gallery. 0 -> Adapt to screensize
'imageWidth' => 120, // Width of the cells containing images in galleries (in "px")
'imageHeight' => 120, // Height of the cells containing images in galleries (in "px")
'captionLength' => 25, // Length of caption to truncate (in characters)
'showBytes' => true, // Show the filesize in bytes in categories
);
| MediaWiki version: | 1.17 |
$wgGalleryOptions = array (
'imagesPerRow' => 0, // Default number of images per-row in the gallery. 0 -> Adapt to screensize
'imageWidth' => 120, // Width of the cells containing images in galleries (in "px")
'imageHeight' => 120, // Height of the cells containing images in galleries (in "px")
'captionLength' => 20, // Length of caption to truncate (in characters)
'showBytes' => true, // Show the filesize in bytes in categories
);