Heading to photoswitchable magnets