Function fileVariant

  • Loads entry list. Expects dmShortID / model to be set. If the model is not public, you also need to provide a token.

    Parameters

    • asset: AssetResource

      asset in question.

    • size: number

      in px to find closest match (larger side)

    • thumb: boolean = false

      if true, returns a thumbnail (width = height)

    Returns any

    const asset = await ecadmin
    .assetgroup("test")
    .getAsset("tP-ZxpZZTGmbPnET-wArAQ");
    const variant = fileVariant(asset, 128, false);