Magnetic vortices in superconducting photon detectors