moved images to database