Thumbnail settings: $wgThumbLimits
List of image thumbnail sizes users can pick from.
Introduced in version:1.5.0
Removed in version:still in use
Allowed values:(array of positive integers)
Default value:(see below)

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.

This setting relates to image thumbnails in articles and other wiki pages. For images as shown on image description pages (File: namespace), see $wgImageLimits .

Default values

MediaWiki version:
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:

// <translate nowrap><!--T:21--> Don't allow more than three thumb sizes to reduce disk usage</translate>
$wgThumbLimits  = array(
   120, // <translate nowrap><!--T:13--> thumb size 0</translate>
   250, // <translate nowrap><!--T:14--> thumb size 1</translate>
   300  // <translate nowrap><!--T:15--> thumb size 2</translate>
   );

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.

// <translate nowrap><!--T:16--> By default display the midsize option</translate>
$wgDefaultUserOptions['thumbsize'] = 1; // <translate nowrap><!--T:17--> thumb size 250</translate>

See also

  • Manual:$wgImageLimits
  • Manual:$wgThumbnailBuckets
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.