add image preview method from api to cli tool