Composition of polynomial and logaritmic function
Consider a Turing machine computing $f$. Suppose that it has $q$ states and $m$ tapes, that the tape alphabet is $\Sigma$, and that on input of length $n$, it uses at most $M(n)$ space. The number of possible configurations of the Turing machine is at most $N(n) = qM(n)^m|\Sigma|^{M(n)}$. In particular, if it runs for more than $N(n)$ steps then some configuration must repeat, and so it never terminates. Since the machine computes $f$, it does terminate, and so it runs in time $N(n)$. In particular, the output size is at most $N(n)$.

When $M(n)$ is polynomial, $N(n)$ is exponential ($2^{n^{O(1)}}$).