save image to localStorage