Programmatically find the canister id of a frontend canister

In one of my motoko actor canisters, I need to generate a URL that points to my frontend asset canister. To do this, I need the cid of the asset canister.

AFAIK it’s not possible to import a frontend canister and use Principal.toText(Principal.fromActor(MyCanister)) since there is no Actor.

How do I find the cid of a frontend canister?