Photons production from the early stages of relativistic heavy ion collisions