Fix handling of image data in responses.  Causing some tests to fail, need to be fixed.