Show proper error message when image upload fails

fixes #994
Merge pull request #1197 from halfdan/994-image-uploads

Show proper error message when image upload fails