Write image to response