Is there a way to manually rotate an image

Unfortunately there isn’t – if the image is rotated “incorrectly” when taken by a smartphone, it will retain that “incorrect” rotation when uploaded here.

(The bug linked was about image metadata for orientation, where the rendering platform / OS would take that metadata into account when displaying the image.)

There is no manual rotation of images supported in Discourse at the current time.