Manual:$wgThumbnailSteps
Appearance
| Thumbnail settings: $wgThumbnailSteps | |
|---|---|
| Array of image widths used as steps for thumbnail sizes. |
|
| Introduced in version: | 1.44.0 (Gerrit change 1121793; git #bf7f5d3c) |
| Removed in version: | Still in use |
| Allowed values: | (array) or null |
| Default value: | null |
| Other settings: Alphabetical | By function | |
Details
Array of image widths used as steps for thumbnail sizes. Requested thumbnail widths are rounded up to the nearest step. The thumbnail with smallest step that has larger value than requested will be shown but it will be downsized via HTML values. It increases the bandwidth to the users by serving slightly large thumbnail sizes they have requested but it will save resources by de-duplicating thumbnail generation and storage. Note that these steps are "best effort" and MediaWiki might decide to use the requested size for any reason.
Example
Since January 2026, Wikimedia Commons uses the following settings:[1]
$wgThumbnailSteps = [20, 40, 60, 120, 250, 330, 500, 960, 1280, 1920, 3840];
See also
- Manual:$wgThumbLimits
- Manual:$wgImageLimits
- Manual:$wgThumbnailBuckets
- Manual:$wgResponsiveImages
- Common thumbnail sizes for the values used by Wikimedia sites