Let $f : \mathbb{R}^n \rightarrow \mathbb{R} \cup \{+\infty,-\infty\}$ and denote $\operatorname{co} f $ to be the convex envelope of $f$ and $\operatorname{dom} f := \{x \in \mathbb{R}^n : f(x) < + \infty\}$.
I know that there are examples where $\operatorname{co} (\operatorname{epi} f) \neq \operatorname{epi} (\operatorname{co} f)$, but, when can we assure that the equality holds?
I was thinking in the case $\operatorname{dom} f$ compact and convex, but haven't been able to prove it yet.