Fix image upload issue.

fixes #1377
Merge pull request #1384 from halfdan/1377-fs-extra

Fix image upload issue.