Function parseAssetId

  • Parses a Sanity asset document ID into individual parts (type, id, extension, width/height etc)

    Parameters

    • documentId: string

      Document ID to parse into named parts

    Returns SanityAssetIdParts

    Object of named properties

    If document ID is invalid