save image data from post request as img