Manual:$wgCopyUploadsDomains

Details

 * The domains in the whitelist can include wildcard characters (*) in place of any of the domain levels, e.g. '*.flickr.com' or 'upload.*.gov.uk'.

Usage
Add to the bottom of your LocalSettings.php: