The phase reversal that occurs when light is reflected from a metallic mirror produces a standing wave with reduced intensity near the reflective surface. This effect is highly undesirable in optoelectronic devices that use metal films as both electrical contacts and optical mirrors, because it dictates a minimum spacing between the metal and the underlying active semiconductor layers, therefore posing a fundamental limit to the overall thickness of the device. Here, we show that this challenge can be circumvented by using a metamaterial mirror whose reflection phase is tunable from that of a perfect electric mirror († = €) to that of a perfect magnetic mirror († = 0). This tunability in reflection phase can also be exploited to optimize the standing wave profile in planar devices to maximize light-matter interaction. Specifically, we show that light absorption and photocurrent generation in a sub-100 nm active semiconductor layer of a model solar cell can be enhanced by ∼20% over a broad spectral band. © 2014 Macmillan Publishers Limited.