Function parseAssetFilename

  • Parses a Sanity asset filename into individual parts (type, id, extension, width, height)

    Parameters

    • filename: string

      Filename to parse into named parts

    Returns SanityAssetIdParts

    Object of named properties

    If image/filename is invalid