Photons from the early stages of relativistic heavy-ion collisions