Manual:$wgUseImageMagick/en

Details
Resizing can be done using PHP's internal image libraries, or using ImageMagick or another third-party converter, e.g. GraphicMagick. These latter converters support more file formats than PHP, which only supports PNG, GIF, JPG, XBM and WBMP. Set  to true to use ImageMagick instead of the builtin functions.

For more information on how to set up ImageMagick, see Manual:Installing third-party tools#Image thumbnailing.

Related settings
You may also need to set $1 to be able to use ImageMagick, although this is sometimes done automatically by the installer.

To fine-tune the output of ImageMagick, set $1 and $2.

$1 sets YUV chroma subsampling mode for JPEG thumbnails to reduce file size.

Some old MediaWiki installations may have $1 set to false. ImageMagick requires that this setting be set to true, or else it will not work.