Function tryGetImageDimensions

Returns the width, height and aspect ratio of a passed image asset, from any inferrable structure (id, url, path, asset document, image object etc)

Object with width, height and aspect ratio properties

  • Parameters

    Returns any

    Returns undefined instead of throwing if a value cannot be resolved