  Let $(\mathbb{T}_f,\mathfrak{m}_f)$ denote the mod $p$ local Hecke algebra
attached to a normalised Hecke eigenform $f$, which is a commutative algebra
over some finite field $\mathbb{F}_q$ of characteristic $p$ and with residue
field $\mathbb{F}_q$. By a result of Carayol we know that, if the residual
Galois representation
$\overline{\rho}_f:G_\mathbb{Q}\rightarrow\mathrm{GL}_2(\mathbb{F}_q)$ is
absolutely irreducible, then one can attach to this algebra a Galois
representation $\rho_f:G_\mathbb{Q}\rightarrow\mathrm{GL}_2(\mathbb{T}_f)$ that
is a lift of $\overline{\rho}_f$. We will show how one can determine the image
of $\rho_f$ under the assumptions that $(i)$ the image of the residual
representation contains $\mathrm{SL}_2(\mathbb{F}_q)$, $(ii)$ that
$\mathfrak{m}_f^2=0$ and $(iii)$ that the coefficient ring is generated by the
traces. As an application we will see that the methods that we use allow us to
deduce the existence of certain $p$-elementary abelian extensions of big
non-solvable number fields.
