Function getImageDimensions

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

    Parameters

    Returns SanityImageDimensions

    Object with width, height and aspect ratio properties

    UnresolvableError Throws if passed image source could not be resolved to an asset ID