The MediaWiki software as of 5 October 2011 checks image metadata such as EXIF and automatically rotates the image when it is uploaded. The file page may show the upright image, but thumbnails may be rotated. At the bottom of the file page there is a Metadata section— click on "Show extended details" to see the orientation.

The file may be stored on Wikipedia or Wikimedia Commons. If the text below the image is "This is a file from the Wikimedia Commons", then it is on Commons.