Slackblocks.Elements.Image (slackblocks v2.8.0)
View SourceAn image displayed inside a section, context, or card.
Slack reference: https://docs.slack.dev/reference/block-kit/block-elements/image-element
Fields
alt_text— Sets a plain-text summary of the image or video for assistive technology. Required.image_url— Sets the publicly accessible URL of the image. Cannot be combined with a Slack file. Optional;nilomits the field.slack_file— Sets a file hosted in Slack as the image source. Cannot be combined with an image URL. Optional;nilomits the field.
Summary
Functions
Atomically replaces supplied fields; omitted fields retain their values.
Replaces fields or raises Slackblocks.ValidationError.
Constructs and validates a value. Text conveniences apply to keyword input.
Constructs a value or raises Slackblocks.ValidationError.
Types
@type t() :: %Slackblocks.Elements.Image{ alt_text: binary(), image_url: binary() | nil, slack_file: Slackblocks.Objects.SlackFile.t() | nil }
Functions
@spec change( t(), keyword() ) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
Atomically replaces supplied fields; omitted fields retain their values.
Replaces fields or raises Slackblocks.ValidationError.
@spec new(keyword()) :: {:ok, t()} | {:error, Slackblocks.ValidationError.t()}
Constructs and validates a value. Text conveniences apply to keyword input.
Constructs a value or raises Slackblocks.ValidationError.