getAssetDimensions()
Overview
public struct function getAssetDimensions(
required string id
, string derivativeName = ""
, string versionId = ""
)
Returns the width and height of the specified asset, optionally for a particular derivative. If the derivative has not yet been generated, the dimensions are calculated from the derivative config, but should be the same as when the derivative is created,
Arguments
Name | Type | Required | Description |
---|---|---|---|
id | string | Yes | The asset ID |
derivativeName | string | No (default="") | Derivative for which to get the dimensions |
versionId | string | No (default="") | Specific version of the asset |