If some of your iPhone or iPad photos are in the wrong orientation, don't worry: The Photos app includes a built-in feature that lets you rotate a photo 90 degrees at a time. Here's how to use it.

First, open the Photos app on your iPhone or iPad and go to the photo you want to rotate.
Before you do anything else, it’s important to understand that Photos will save the rotation changes to your original image. If you want to keep an original copy of the image, we recommend that you first create a duplicate image for editing purposes. To do this, tap the Share button and select “Duplicate.”
Once you're ready to rotate, tap the “Edit” button on the top toolbar to enter photo editing mode.

On the image editing screen, tap the Crop button on the bottom toolbar.

At the top of the screen, tap the rotate icon.

This will immediately rotate the image 90 degrees to the left (counterclockwise).
Each time you tap the rotate button, you rotate the image 90 degrees again. Four taps, for example, will return you to the original image. Once you are satisfied with the rotated image, tap the “Done” button in the bottom toolbar.

The image thumbnail will be updated in the photo library.

You can now freely share the rotated image as you normally would, and the recipient will see it in the correct orientation.
How to undo rotation
Editing photos in the Photos on iPhone and iPad is non-destructive. This means you can revert the changes you've made.
If you want to undo the rotation, go to the image in the Photos app and tap the “Edit” button.

On the photo editing screen, tap the “Revert” button in the lower right corner.

In the pop-up window, select “Revert to Original”.

The image will be immediately restored to its original state and will be exactly as it was before the rotation.
Information source: howtogeek.com
