some modification of image upload