Move ws image buffer to ws object

Well, if self is null what am I supposed to return? You can't get `data` from a null object.