make 'upload_image' function more flexible
upload_image func return None on error
Merge pull request #3 from ZEDGR/master

make 'upload_image' function more flexible