update image and database