In situ microanalysis of solid samples is often performed using secondary ion mass spectrometry (SIMS) with a submicron ion probe. The destructive nature of the method makes it mandatory to prevent information loss by using instruments combining efficient collection of secondary ions and a mass spectrometer with parallel detection capabilities. The NanoSIMS meets those requirements with a magnetic spectrometer but its mass selectivity has to be improved for accessing opportunities expected from polyatomic secondary ions. We show here that it is possible to perform D/H ratio measurement images using 12CD-/12CH-, 16OD-/16OH-, or 12C2D-/12C2H- ratios. These polyatomic species allow simultaneous recording of D/H ratios and isotopic compositions of heavier elements like 15N/14N (via 12C15N-/12C14N-) and they provide a powerful tool to select the phase of interest (e.g., mineral versus organics). We present high mass resolution spectra and an example of isotopic imaging where D/H ratios were obtained via the 12C2D-/12C2H- ratio with 12C2D- free from neighboring mass interferences. Using an advanced mass resolution protocol, a "conventional" mass resolving power of 25,000 can be achieved. Those results open many perspectives for isotopic imaging at a fine scale in biology, material science, geochemistry, and cosmochemistry.