[api] fix returning image data