Provides a utility to validate media file types and determine the appropriate HTML element type for rendering.

Methods

Methods

  • Parses the provided file path to determine the media type and validity based on the file extension. Certain extensions can be excluded in addition to filtering by specified media types.

    Parameters

    Returns ParsedMediaResult

    The parsed asset information containing the file path, extension, element type, and whether the parsing is valid for the file extension is supported and not excluded.

    If the provided url is not a string or URL, routePrefix is not a string, exclude is not a Set, or mediaTypes is not a Set.