update database for image