Image API component
Create a Image object for the API
The image file's link or id
Whether image is an id (true) or a link (false)
Optional
Describes the specified image media
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!"); Copy
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!");
Readonly
The file's caption
The id of the media
The link of the media
Image API component