Owing to the limited dynamic range of a neuron's output, neural circuits are faced with a trade-off between encoding the full range of their inputs and resolving gradations among those inputs. For example, the ambient light level varies daily over more than nine orders of magnitude, whereas the firing rate of optic nerve fibres spans less than two. This discrepancy is alleviated by light adaptation: as the mean intensity increases, the retina becomes proportionately less sensitive. However, image statistics other than the mean intensity also vary drastically during routine visual processing. Theory predicts that an efficient visual encoder should adapt its strategy not only to the mean, but to the full shape of the intensity distribution. Here we report that retinal ganglion cells, the output neurons of the retina, adapt to both image contrast-the range of light intensities-and to spatial correlations within the scene, even at constant mean intensity. The adaptation occurs on a scale of seconds, one hundred times more slowly than the immediate light response, and involves 2-5-fold changes in the firing rate. It is mediated within the retinal network: two independent sites of modulation after the photoreceptor cells appear to be involved. Our results demonstrate a remarkable plasticity in retinal processing that may contribute to the contrast adaptation of human vision.