If you have a ton of photos that are all facing the wrong direction and don’t want to do them individually, you can use Hazel to automatically go through a folder and rotate the images for you. All it takes is a one-line bash script and a Hazel rule.
sips -r 90 "$f"
This rotates the image 90 degrees. You can set it to 180 or whatever else you want.