Thank you David but I don't think your problem was the same. I have checked through that thread but I don't have any errors or permission problems. The images are getting uploaded perfectly and I can view them if I go to them directly through the url. The problem is that the filename is getting stored in the database with an extra extension ie .jpg.jpg