  According to the no-hair theorem, all astrophysical black holes are fully
described by their masses and spins. This theorem can be tested observationally
by measuring (at least) three different multipole moments of the spacetimes of
black holes. In this paper, we analyze images of black holes within a framework
that allows us to calculate observables in the electromagnetic spectrum as a
function of the mass, spin, and, independently, the quadrupole moment of a
black hole. We show that a deviation of the quadrupole moment from the expected
Kerr value leads to images of black holes that are either prolate or oblate
depending on the sign and magnitude of the deviation. In addition, there is a
ring-like structure around the black-hole shadow with a diameter of about 10
black-hole masses that is substantially brighter than the image of the
underlying accretion flow and that is independent of the astrophysical details
of accretion flow models. We show that the shape of this ring depends directly
on the mass, spin, and quadrupole moment of the black hole and can be used for
an independent measurement of all three parameters. In particular, we
demonstrate that this ring is highly circular for a Kerr black hole with a spin
a<0.9M, independent of the observer's inclination, but becomes elliptical and
asymmetric if the no-hair theorem is violated. Near-future very-long baseline
interferometric observations of Sgr A* will image this ring and may allow for
an observational test of the no-hair theorem.
