Skip to main content

Generate image block

Generates a block with an image to add to the message block array

Function GenerateImageBlock(Val URL, Val AlternateText = "") Export

ParameterCLI optionTypeDescription
URL--pictureStringImage URL
AlternateText--altStringAlternate text of the image

Returns: Map Of KeyAndValue - Image block


Code example
  
Text = "Alpaca picture";
URL = "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/Media/logo.png?v1";

Response = OPI_Slack.GenerateImageBlock(URL, Text); //Map
Response = OPI_Tools.JSONString(Response); //JSON string
CLI command example
    
oint slack GenerateImageBlock --picture "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/Media/logo.png?v1" --alt %alt%

Result
{
"alt_text": "Yo",
"image_url": "https://github.com/Bayselonarrend/OpenIntegrations/raw/main/Media/logo.png?v1",
"type": "image"
}