Optoelectronic devices present a promising avenue for emulating the human visual system. However, existing devices struggle to maintain optical image information after removing external stimuli, preventing the integration of image perception and memory. The development of optoelectronic memory devices offers a feasible solution to bridge this gap. Simultaneously, the artificial vision for perceiving and storing ultraviolet (UV) images is particularly important because UV light carries information imperceptible to the naked eye. This study introduces a multi-level UV optoelectronic memory based on gallium nitride (GaN), seamlessly integrating UV sensing and memory functions within a single device. The embedded SiO2 side-gates around source and drain regions effectively extend the lifetime of photo-generated carriers, enabling dual-mode storage of UV signals in terms of threshold voltage and ON-state current. The optoelectronic memory demonstrates excellent robustness with the retention time exceeding 4 × 104 s and programming/erasing cycles surpassing 1 × 105. Adjusting the gate voltage achieves five distinct storage states, each characterized by excellent retention, and efficiently modulates erasure times for rapid erasure. Furthermore, the integration of the GaN optoelectronic memory array successfully captures and stably stores specific UV images for over 7 days. The study marks a significant stride in optoelectronic memories, showcasing their potential in applications requiring prolonged retention.