Function getExtension

  • Returns the file extension for a given asset

    Parameters

    • src: SanityAssetSource

      Input source (file/image object, asset, reference, id, url, path)

    Returns string

    The file extension, if resolvable (no . included)

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