Manual:$wgHashedUploadDirectory

Details
If, uploaded files will be distributed into sub-directories of $wgUploadDirectory based on the first two characters of the md5 hash of the filename. (e.g. ) Creation of such subdirectories is handled automatically. If, all images are uploaded in $wgUploadDirectory itself. (e.g. )