Probing the early-time dynamics of relativistic heavy-ion collisions with electromagnetic radiation