Let me guess, you took this photo with an Apple iPhone. Am I correct?
When you attach files to your post, the file is stored exactly as it is given to store it. There is no processing done to it, since the file could be either a jpg, png, animated gif, txt file or pdf document... or movie format, etc. The attachment manager does just that, it attaches something to your post. The inlining of the attached file is just a courtesy - whether it be an image or a pdf preview.
The iPhone stores the image rotation exif detsils within the photo - rather than actually rotating the pixels within the file.
Your browser interprets each picture as it chooses. Some browsers look at the exif information, and rotate the image. Some browsers do not. Some browsers ignore the exif information when the image is surounded by html. but if the image is viewed on its own, the browser lookes at the image's exif data. this is done for speed. Apple doesnt respect this,and instead of saving the image in the orientation which it was taken, it just adds a rotation request to the exif data.
more information on that, at:http://www.ubbdev.com/forums/ubbthreads.php/topics/320994l#Post320994
This topic was just recently discussed in detail and with examples a few months ago at:http://www.ubbcentral.com/forums/ubbthreads.php/topics/257017#Post257017