Made Image Upload function more extensive

Prepared Image Upload function more extensive. Need to make it functional now.