One line solution:
Picasso.with(context).load("http://i.imgur.com/DvpvklR.png").into(imageView);
Or
Picasso.with(context).load("file:" + photoPath).into(imageView);
This will autodetect rotation and place image in correct orientation
Picasso is a very powerful library for handling images in your app includes: Complex image transformations with minimal memory use.