Image upload directive
Image upload directive refactoring