#12: Refactoring image upload