Neuromorphic computing applies concepts extracted from neuroscience to develop devices shaped like neural systems and achieve brain-like capacity and efficiency. In this way, neuromorphic machines, able to learn from the surrounding environment to deduce abstract concepts and to make decisions, promise to start a technological revolution transforming our society and our life. Current electronic implementations of neuromorphic architectures are still far from competing with their biological counterparts in terms of real-time information-processing capabilities, packing density and energy efficiency. A solution to this impasse is represented by the application of photonic principles to the neuromorphic domain creating in this way the field of neuromorphic photonics. This new field combines the advantages of photonics and neuromorphic architectures to build systems with high efficiency, high interconnectivity and high information density, and paves the way to ultrafast, power efficient and low cost and complex signal processing. In this Perspective, we review the rapid development of the neuromorphic computing field both in the electronic and in the photonic domain focusing on the role and the applications of memristors. We discuss the need and the possibility to conceive a photonic memristor and we offer a positive outlook on the challenges and opportunities for the ambitious goal of realising the next generation of full-optical neuromorphic hardware.