The potential energy with which light interacts in a lens (lattice) is electromagnetic. A periodic potential energy (not mass, but electromagnetic).
Sheesh! Photons have mass relativistically (equivalence of mass and energy). That's why different wavelengths have different energies. Planck's constant is an "action" constant, equivalent to energy by relativity. Electrons leave holes when ejected photo-electrically from a surface. These holes have charge.
"rest" is a Newtonian/Galilean concept suggesting motion. Not relativistic in QFT (inside matter).
Village Idiot. I'm outta here.... Neverfly is a pompous ignoramus. He has only a high school understanding of physics, if that.... (and a dumb high school student at that).