Manual:$wgEnableImageWhitelist

Usage
If $wgAllowExternalImages is false, enabling this will turn on an on-wiki external image whitelist at MediaWiki:External image whitelist. Items on this whitelist are regular expression fragments that are each matched when an external image is being parsed. Items that match a whitelist entry will be displayed, those that do not match will be linked.

Lines on the whitelist starting with # and blank lines are not used to find a match

This setting may be used concurrently with $wgAllowExternalImagesFrom without any issues.

Example
http://upload\.wikimedia\.org/ http://.*?\.photobucket\.com/
 * 1) This line is a comment. The part below allows all images from commons
 * 1) Allow Photobucket