An array of dielectric resonators is formed on the substrate of an optoelectronic device. Each resonator includes an active medium having an optical transition that is operative in a process of photodetection or photoemission. The dielectric resonators in the array are each dimensioned to provide a resonance that lies substantially at the frequency of the optical transition.