class Line::Message::Builder::Flex::Image

Represents an “image” component in a LINE Flex Message.

Images are specified by a URL and can be included in various parts of a Flex Message, such as a box, a bubble’s hero section, etc. They offer several properties to control their appearance, including size, aspect_ratio, and aspect_mode. An image can also have an action to make it tappable.

Example

Line::Message::Builder.with do
  flex alt_text: "Image Example" do
    bubble do
      body do
        image "https://example.com/image.png",
              aspect_ratio: "16:9",
              aspect_mode: :cover,
              size: :full
        end
      end
    end
  end
end

See also: