(Not sure if this problem is related to any of the tasks in T33504.)
As reported on https://commons.wikimedia.org/wiki/Commons:Forum#Mal_was_kniffeliges, there are rotation problems with some images. (Edit: Now archived in https://commons.wikimedia.org/wiki/Commons:Forum/Archiv/2017/August#Mal_was_kniffeliges)
See file versions of
https://commons.wikimedia.org/wiki/File:Rostockstein.jpg
https://commons.wikimedia.org/wiki/File:Carrie_Brownstein_of_Wild_Flag_-_outdoor_stage_Coachella_2012.jpg
When opening the original files in a browser, everything looks fine. Only the Mediawiki thumbnails are rotated or stretched badly.