added support for image upload