whatsapp-api-js - v5.2.0
    Preparing search index...

    Class Image

    Image API component

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Constructors

    • Create a Image object for the API

      Parameters

      • image: string

        The image file's link or id

      • isItAnID: boolean = false

        Whether image is an id (true) or a link (false)

      • Optionalcaption: string

        Describes the specified image media

      Returns Image

      import { Image } from "whatsapp-api-js/messages";

      const image_message = new Image("https://i.imgur.com/4QfKuz1.png");

      const image_id_message = new Image("12345678", true);

      const image_caption_message = new Image(
      "https://i.imgur.com/4QfKuz1.png",
      false,
      "Hello world!"
      );

    Properties

    caption?: string

    The file's caption

    id?: string

    The id of the media

    link?: string

    The link of the media