  Let $K$ be a number field and let $E/K$ be an elliptic curve whose mod $\ell$
Galois representation locally has image contained in a group $G$, up to
conjugacy. We classify the possible images for the global Galois representation
in the case where $G$ is a Cartan subgroup or the normalizer of a Cartan
subgroup. When $K = \mathbf{Q}$, we deduce a counterexample to the local-global
principle in the case where $G$ is the normalizer of a split Cartan and $\ell =
13$. In particular, there are at least three elliptic curves (up to twist) over
$\mathbf{Q}$ whose mod $13$ image of Galois is locally contained in the
normalizer of a split Cartan, but whose global image is not.
