whenever I view photos on Ubuntu (Lucid), they are always oriented correctly. However, when I upload them to any web-page any portrait photos are rotated on their side. There seems to be no easy way to correct this; if I first click rotate in ubuntu, it rotates the image so that it is on its side but when it's uploaded to a web-page it is still on its side

The only solution I have found is to load the image into GIMP, rotate it and then save it but this uses lossy compression for JPG's and is a hassle to have to do this for the hundreds++ of photos I've taken. Is there an easier way - on windows, all the portrait images are side-on to start with and once I've clicked the rotate button, they're good to go (but again this compresses the image).

Also any JPEG/JPG files are ignored by EVERY photo website I've tried because the file extension is upper-case. They all say this is a fault with Ubuntu and that I should rename all the file-extensions for my images. No chance, even with a batch converter it is way too much hassle to convert every image name so, as it stands, I can't upload to anywhere but facebook (only 5 images at a time!) and even then half of them are the wrong orientation. Please help - it's doing my tiny head in now.