This paper continues our study of Sobolev-type imbedding inequalities involving rearrangement-invariant Banach function norms. In it we characterize when the norms considered are optimal. Explicit expressions are given for the optimal partners corresponding to a given domain or range norm.