Add and use  method for saving images.