The use of quantum and photon confinement has enabled a true revolution in the development of high-performance semiconductor materials and devices. Harnessing these powerful physical effects relies on an ability to design and fashion structures at length scales comparable to the wavelength of electrons (approximately 1 nm) or photons (approximately 1 microm). Unfortunately, many practical optoelectronic devices exhibit intermediate sizes where resonant enhancement effects seem to be insignificant. Here, we show that leaky-mode resonances, which can gently confine light within subwavelength, high-refractive-index semiconductor nanostructures, are ideally suited to enhance and spectrally engineer light absorption in this important size regime. This is illustrated with a series of individual germanium nanowire photodetectors. This notion, together with the ever-increasing control over nanostructure synthesis opens up tremendous opportunities for the realization of a wide range of high-performance, nanowire-based optoelectronic devices, including solar cells, photodetectors, optical modulators and light sources.