# If $G$ embeds isomorphically into $\operatorname{Aut}(G)$ does that imply $Z(G) = \{1\}$?

I am consider a sort of converse to the following: If $Z(G)=\{1\}$ we have $G = G/Z(G) \operatorname{Inn}(G)\leq\operatorname{Aut}(G)$. That is, $G$ is a subgroup of $Aut(G)$.

Suppose $G$ is a group such that there is an injective homomorphism $f:G \to \operatorname{Aut}(G)$, that is it is a subgroup of its automorphisms. Does this imply that $Z(G) = \{1\}$?

No. The dihedral group $D_4$ of order $8$ is isomorphic to its automorphism group, but its center is non-trivial.