Manual:$wgEnableAutoRotation

Usage
To explicitly disable Image auto-rotation add to the bottom of LocalSettings.php

Explicitly setting to true is probably a bad idea (Since if the image render-er supports rotation, it should be auto-detected).

Details
If it is true, MediaWiki will look at the Exif Orientation metadata field (Which is set by digital cameras when pictures are taken sideways) and automatically rotate the image to the correct rotation.

If not set in LocalSettings.php (or if set to null) then this setting takes its value from BitmapHandler::canRotate method - which returns true if the image rendering method supports rotation.