Manual:$wgUploadStashScalerBaseUrl

Details
To enable remote on-demand scaling, set this to the thumbnail base URL. Full thumbnail URL will be like $wgUploadStashScalerBaseUrl/e/e6/Foo.jpg/123px-Foo.jpg where 'e6' are the first two characters of the MD5 hash of the file name. If this is set to false, thumbs are rendered locally as needed.