The image of $T$ is an interval $[a,b] \subset [0,1]$.

$T_f$ induce an isometric inclusion of $C([a,b])$ in $C([0,1])$.

If $T_f$ was compact then weak convergence of a bounded sequence in $C([a,b])$ would imply norm convergence in $C([0,1])$ which would in turn (as $T_f$ is isometric) imply norm convergence in $C([a,b])$. which is only possible if $C([a,b])$ is finite dimensional i.e. if $T$ is constant.