Nanodomains formed by microphase separation in thin films of the diblock copolymers poly(styrene-b-2-vinylpyridine) (PS-b-P2VP) and poly(styrene-b-ethyleneoxide) (PS-b-PEO) were imaged by means of infrared scattering-type near-field microscopy. When probing at 3.39 mum (2950 cm(-1)), contrast is obtained due to spectral differences between the C--H stretching vibrational resonances of the respective polymer constituents. An all-optical spatial resolution better than 10 nm was achieved, which corresponds to a sensitivity of just several thousand C--H groups facilitated by the local-field enhancement at the sharp metallic probe tips. The results demonstrate that infrared spectroscopy with access to intramolecular dimensions is within reach.