Replace Assets

Use postAsset() to register dynamic assets so your Expansion can safely display them in the frontend.

To be able to send any assets to the client, you first need to load them in a way the Nexo Maker's client will understand, for this reason, any asset as to be loaded into a variable using

Posting Assets with postAsset()

nm.postAsset({
  Add: base64Data
});

💡 Example Usage

const icon = await api.nexomaker.imgconvert(__dirname + "/assets/add-icon.png");

nm.postAsset({
  Add: icon
});

⚠️ Notes

  • Keys are injected as global variables inside your Expansion's UI context.

  • Keep keys short and unique to avoid conflicts.

Last updated