  A search for the rare decay of a $B^{0}$ or $B^{0}_{s}$ meson into the final
state $J/\psi\gamma$ is performed, using data collected by the LHCb experiment
in $pp$ collisions at $\sqrt{s}=7$ and $8$ TeV, corresponding to an integrated
luminosity of 3 fb$^{-1}$. The observed number of signal candidates is
consistent with a background-only hypothesis. Branching fraction values larger
than $1.7\times 10^{-6}$ for the $B^{0}\to J/\psi\gamma$ decay mode are
excluded at 90% confidence level. For the $B^{0}_{s}\to J/\psi\gamma$ decay
mode, branching fraction values larger than $7.4\times 10^{-6}$ are excluded at
90% confidence level, this is the first branching fraction limit for this
decay.
