Implemented handling for image storing