save image data as json