save image in factory