Class Thumbnail

Represents a thumbnail for Content on iFunny

Hierarchy

  • Thumbnail

Constructors

Properties

Thumbnail_ID_Regex: RegExp = ...

The regex used to find the thumbnail ID

Accessors

  • get id(): string
  • Gets the ID of the thumbnail from its URL.

    Throws

    An error if the ID cannot be found in the URL.

    Returns

    The ID string.

    Returns string

  • get largeUrl(): string
  • Gets the large image URL.

    Returns

    The URL string or null if not available.

    Returns string

  • get largeWebpUrl(): string
  • Gets the large WebP image URL.

    Returns

    The URL string or null if not available.

    Returns string

  • get proportionalUrl(): string
  • Gets the proportional image URL.

    Returns

    The URL string or null if not available.

    Returns string

  • get proportionalWebpUrl(): string
  • Gets the proportional WebP image URL.

    Returns

    The URL string or null if not available.

    Returns string

  • get smallUrl(): null | string
  • Gets the small image URL.

    Returns

    The URL string or null if not available.

    Returns null | string

  • get x640Url(): string
  • Gets the 640px wide image URL.

    Returns

    The URL string or null if not available.

    Returns string

  • get x640WebpUrl(): string
  • Gets the 640px wide WebP image URL.

    Returns

    The URL string or null if not available.

    Returns string

Methods

  • Create a new thumbnail with custom parameters

    Parameters

    • params: string

      Params for the new thumbnail

    • extension: "jpg" | " webp" = "jpg"

      File extension for the thumbnail. (Default: jpg)

    Returns string

Generated using TypeDoc