Liposomal nanoparticles incorporating photosensitive lipids and enclosing paramagnetic molecules enable the mapping, via magnetic resonance imaging, of spatial variations of light intensity in illuminated brain tissue in living animals.