Image geek here- there are two reasons/problems why the images are showing up sideways:
There's a little orientation flag that the iPhone (and other apps set) which say "hey, this image should be turned sideways when rendering it", and it's causing problems in two spots:
a) The form is setting the wrong width / height for the image tag, not taking into account this flag.
b) But even worse, webkit (the engine that powers Safari on OS X and iOS) isn't taking into account that flag either when rendered inline for a page. You can however open up the image in a new window, and it loads fine.
As you've discovered, the workaround is to edit the image in something that'll reset that orientation flag so it's not needed.