# image

### <mark style="color:orange;">`image(params=Hash)`</mark>

### **Platforms**

<table><thead><tr><th width="362.78343949044586">Platform</th><th data-type="checkbox">Supported</th></tr></thead><tbody><tr><td>Messenger</td><td>true</td></tr><tr><td>WhatsApp</td><td>true</td></tr><tr><td>Telegram</td><td>true</td></tr></tbody></table>

### Usage

```ruby
@reply.image({
  url: "https://pbs.twimg.com/profile_images/1533726469641338881/Q9dM6DpM_400x400.jpg",
  caption: "Kogno Framework",
  buttons: [
    {
      payload: :contact_us,
      title: "Contact US!"
    },
    {
      payload: :twitter,
      title: "Follow US!"
    }
  ]
})
```

### Params

<table><thead><tr><th width="190">Name</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:orange;"><code>url</code></mark><br>String</td><td><p><strong>Required.</strong></p><p>Image URL</p></td></tr><tr><td><mark style="color:orange;"><code>caption</code></mark><br>String</td><td><strong>Optional:</strong> Telegram and WhatsApp<br><strong>Required:</strong> Messenger.<br>Brief description of the image.</td></tr><tr><td><mark style="color:orange;"><code>buttons</code></mark><br>Array</td><td><strong>Optional.</strong><br>Array of buttons, depending on the platform they can be of different types, by default they are <code>payload</code>.</td></tr><tr><td><mark style="color:orange;"><code>image_aspect_ratio</code></mark><br>Enum</td><td><strong>Optional.</strong><br>Only available on Messenger.<br><code>:horizontal</code> (Default) or <code>:square</code></td></tr></tbody></table>
