Added function to added images to the local storage.