According to electromagnetic theory, the rest mass of photon in free space is zero and also photon has non-zero rest mass, as well as wavelength-dependent.
Can a photon have rest mass explain?
Photons have no REST mass, because they only exist travelling at the light velocity c. However, they do have a mass m (not a rest one !)
Is photon zero a mass?
In modern terminology the mass of an object is its invariant mass, which is zero for a photon.