adding image parsing logic in client