  Here, we demonstrate a gradiometry technique that significantly enhances the
measurement sensitivity of such static fields, leading to new opportunities in
the imaging of weakly magnetic systems. Our method relies on the mechanical
oscillation of a single nitrogen-vacancy center at the tip of a scanning
diamond probe, which up-converts the local spatial gradients into ac magnetic
fields enabling the use of sensitive ac quantum protocols. We show that
gradiometry provides important advantages over static field imaging: (i) an
order-of-magnitude better sensitivity, (ii) a more localized and sharper image,
and (iii) a strong suppression of field drifts. We demonstrate the capabilities
of gradiometry by imaging the nanotesla fields appearing above topographic
defects and atomic steps in an antiferromagnet, direct currents in a graphene
device, and para- and diamagnetic metals.
