Photons have no rest mass. But the quantity that determines how a thing gravitates, or responds to gravitation, is not rest mass. It is a complex entity called the stress-energy-momentum tensor that consists of energy, momentum, pressure and shear str…