മാനുവൽഃ $wgMaxImageArea

This page is a translated version of the page Manual:$wgMaxImageArea and the translation is 9% complete.
Images: $wgMaxImageArea
വളരെയധികം വർക്കിംഗ് മെമ്മറി ഉപയോഗിക്കുകയാണെങ്കിൽ ഒരു ചിത്രം ലഘുചിത്രമാക്കരുത്.
Introduced in version:1.6.0 (r11398)
Removed in version:Still in use
Allowed values:number (floating point)
Default value:12500000 (1.39+)
1.25e7 (1.6-1.38)

This value specifies the maximum number of pixels a source image can have if it is to be scaled down by a scaler that requires the full source image to be decompressed and stored in decompressed form, before the thumbnail is generated. This provides a limit on memory usage for the decompression side of the image scaler.

If set to false, MediaWiki will not check the size of the image before attempting to scale it. Extensions may still override this setting by using the BitmapHandlerCheckImageArea hook.

The limit is used when scaling images with any of the built-in image scalers, such as ImageMagick or GD. It is ignored for JPEGs with ImageMagick, and also when using the VipsScaler , extension as these situations do not cause excess memory usage.

Default is 50 MB if decompressed to RGBA form, which corresponds to 12.5 million (1.25e7) pixels or 3500×3500.

To be clear, this only prevents server-side scaling of large images. Users are still allowed to upload large files.
Warning Warning: If you increase this value, you may also need to increase $wgMaxShellMemory (Or if using GD as your image scaler, $wgMemoryLimit ).


Example code

Pixels Code
2,50,00,000 5000×5000 $wgMaxImageArea = 2.5e7;
3,60,00,000 6000×6000 $wgMaxImageArea = 3.6e7;
4,90,00,000 7000×7000 $wgMaxImageArea = 4.9e7;
6,40,00,000 8000×8000 $wgMaxImageArea = 6.4e7;
8,10,00,000 9000×9000 $wgMaxImageArea = 8.1e7;
10,00,00,000 10000×10000 $wgMaxImageArea = 10e7;

Troubleshooting

File with dimensions greater than …

If you are uploading an image and you get this exception or a similar one:

Error creating thumbnail: File with dimensions greater than 12.5MP

You can increase the current value of the variable $wgMaxImageArea in your settings.

Unable to extend cache

If you are uploading an image and you already increased the above limit but you still get this error:

Error creating thumbnail: Unable to extend cache

Then try increasing the following related limits as well:

See also