Manual:$wgThumbLimits/pt
<translate> Thumbnail settings</translate>: $wgThumbLimits | |
---|---|
List of image thumbnail sizes users can pick from. |
|
<translate> Introduced in version:</translate> | 1.5.0 |
<translate> Removed in version:</translate> | <translate> still in use</translate> |
<translate> Allowed values:</translate> | (array of positive integers) |
<translate> Default value:</translate> | (see below) |
<translate> Other settings:</translate> <translate> Alphabetical</translate> | <translate> By function</translate> |
Details
Users can select a default image thumbnail size in their preferences, which is used for all images displayed as thumbnails that lack an explicitly defined size. In order to reduce disk usage, users can only select a value from this list.
$wgImageLimits
. For errors such as "Error creating thumbnail: File with dimensions greater than 12.5 MP", see $wgMaxImageArea .Default values
Versão MediaWiki: | <translate> ≥</translate> 1.5 |
$wgThumbLimits = [
120,
150,
180,
200,
250,
300
];
Example
In order to reduce disk usage, the number of different values selectable from a list may by reduced. Put these settings in your LocalSettings.php :
// Don't allow more than three thumb sizes to reduce disk usage
$wgThumbLimits = array(
120, // thumb size 0
250, // thumb size 1
300 // thumb size 2
);
If you change this array, you also want to change the default user option
for thumb sizes on pages.
Each thumb size set is automatically associated with an integer value that may be used for the "thumbsize" user option.
This value always starts with "0" for the lowest thumb size set in the array and increases by 1 per additional thumb size defined, e.g. if five different thumb sizes were set the lowest value for the user option is "0" while "4" is the highest.
// By default display the midsize option
$wgDefaultUserOptions['thumbsize'] = 1; // thumb size 250