I was trying to upload a image to my picture library using sharepoint client object model.

I Used the code from the below blog to upload a file to my picture library.

http://blogs.msdn.com/b/sridhara/archive/2010/03/12/uploading-files-using-client-object-model-in-sharepoint-2010.aspx

The image got uploaded sucessfully. But when we took the relative url to update in a different list, we were getting empty image symbol.

After a lot of analysis we figured out that the issue was with the file we uploaded. An image file which is of jpeg quality was uploaded to an application with giff extension.

Try this. Copy a JPG file from net and save it to your file system. Change the extension of the file from jpg to giff.

When you change the file extension the image quality remains same but it will open in picture viewers. Upload the file to your picture library. Once uploaded you will get the file listed as thumbail in your picture library. Click on the thumbnail image it will open up a page showing a larger image with file details.

Now click either on the image or the file name hyper link, it will open up an empty page with default no image symbol.

I wasted a lot of time on this figuring out the issue, so thought of sharing here. Hope this helps some one.