Manual:$wgThumbnailScriptPath

Thumbnail settings: $wgThumbnailScriptPath
Path to thumb.php , if you want thumbnail generation on the fly.
Introduced in version:1.5.0
Removed in version:still in use
Allowed values:(filesystem path) or false
Default value:false

Details edit

Give a path here to use thumb.php for thumbnail generation on client request, instead of generating them on render and outputting a static URL. This is necessary if some of your apache servers don't have read/write access to the thumbnail path.

If you want to use this feature, you would set this as follows:

$wgThumbnailScriptPath = "$wgScriptPath/thumb.php";

See also edit