It’s very easy to correct and straighten a crooked photousing the rotate tool in GIMP.
The sides of the image must be cropped to make up for the slanting of the photo from rotation.
GIMP 2.10.8 was used for the tutorial below.

It should work for other versions up to GIMP 2.8 as well.
Straighten Your Image
Open your photo inGIMP.
This photo was taken by a talented photographer onUnsplash.

She didn’t make it crooked, we did for this guide.
With your photo open, move your cursor to the ruler at the top of the document window.
Click and drag down to put a guideline on the image.

Place the guideline so it intersects with the horizon in your photo.
Select theRotate Toolfrom the toolbox.
Turn your attention to the tool options.

By default, they’re just below your toolbox.
Set theClippingoption for theRotate TooltoCrop with aspect.
Select your photo to highlight it for rotation.

From there, you have your choice of how to rotate it.
you might click and drag the photo in a circular motion to adjust it.
you’re free to also use the slider on theRotatewindow that just popped option to set your rotation.

when you obtain your image aligned correctly, pressRotateto set it in place.
Things will probably still look a bit off to you here.
The image is going to be floating in a bunch of empty space.

Thankfully, GIMP has a way to fix that.
SelectImagefrom the top menu.
Then, pickCrop to Content.

On versions of GIMP prior to 2.10,Crop to ContentwasAutocrop Image.
Take a look at the result.
Your image should now be perfectly aligned with your horizontal guide.

Next, get rid of that horizontal guide before you export your image.
Go toImage > Guides > Remove all Guidesto remove the guideline.
it’s possible for you to export the result when you’re ready.

It’ll be smaller than the original, but it will also be perfectly straight and horizontal.