The secret of the mass energy equation is the source of photon energy.
The interference of electrons indicates that photons are particles. The electric field of an electron has no force on itself, indicating that electrostatic force is a force between charges, not between electric fields and charges. Electric field is not matter, and no flying electromagnetic field (electromagnetic wave). Electromagnetic wave theory is a good mathematical method. 100% of matter is composed of electric charges, the cause of mass loss is charge breakage, and photons come from the breaking of these charges. Therefore, photon energy comes from charge potential energy.
Article Photon energy and photon behavior discussions