MediaWiki Render large GIFs
From WikiMLT
Here is a short manual how to allow MediaWiki 1.35+ to render large GIF files. By the default configuration I've faced a trouble when tried to render a GIF file with 502 frames and resolution 960×612 pixels.
ImageMagick: Configure memory allocation
Find the ImageMagick' configuration file by the following command.
identify -list policy | grep 'Path.*xml'
The memory limit can be configured by modifying the following line in /etc/ImageMagick‑6/policy.xml
.
<policy domain="resource" name="memory" value="256MiB"/>
If your server has enough RAM set value="1GiB"
.
MediaWiki: Increase memory limit
Edit your LocalSettings.php
and set appropriate values for $wgMaxShellMemory
, $wgMaxImageArea
and $wgMaxAnimatedGifArea
. In my case these are as follow.
<?php // remove this tag
$wgMaxShellMemory = 1228800;
$wgMaxImageArea = 10e7;
$wgMaxAnimatedGifArea = 10e7;
References
- Configuring memory allocation in ImageMagick
- mw:Manual:$wgMaxShellMemory see also mw:Manual:$wgMemoryLimit
- mw:Manual:$wgMaxImageArea
- mw:Manual:$wgMaxAnimatedGifArea
- mw:Manual:Image administration