Metal–organic frameworks (MOFs), characterized by tunable porosity, high surface area, and diverse chemical compositions, offer unique prospects for applications in optoelectronic devices. However, the prevailing research on thin‐film devices utilizing MOFs has predominantly focused on aspects such as information storage and photosensitivity, often neglecting the integration of the advantages inherent in both photonics and electronics to enhance optical memory. This work demonstrates a light‐mediated resistive memory device based on a highly oriented porphyrin‐based MOFs film, in which the resistance state of the memristor is modulated by light, realizing the integration of the perception and storage of optical information. The memristor shows excellent performance with a wide light range of 405–785 nm and a persistent photoconductivity phenomenon up to 8.3 × 103 s. Further mechanistic studies have revealed that the resistive switching effect in the memristor is primarily associated with the reversible formation and annihilation of Ag conductive filaments.