Hello
Thank you for your query. Can you please try using the same resolution for all images and check once? It should be okay then. Also, sometimes this problem is caused as some photos might be taken in a different direction, and gallery uses their orginal EXIF / IPTC data.
In that cause you should on your laptop open those "broken" images and save them again as JPG without those hidden settings using Photo editor. Then upload into gallery again, then it should be okay. You can also try using Irfanview client to edit/save all images in batch. You can also delete the images. Then rotate it right using some picture editor and save it. Then upload the right images there. Also please try clearing the cache as well.