I just had this same issue - I found that if I opened the image in Photoshop (or similar, eg Photopea) and saved again without changes, a portrait photo works fine. Not sure why that would be though!
Sunset, Camperdown near Dundee, Scotland - September 2015 - Lemmy.world
EDIT - that’s gone sideways - so here it is the right way up:
[https://lemmy.world/pictrs/image/898b06f4-82d4-4ba2-84b3-fd25ad343911.jpeg]