# Create video thumbnails for email

Generate clickable poster images from video for email campaigns

"Carrier" (an email marketing app like Mailchimp) can't embed video in email -- but a thumbnail with a play button overlay gets clicks.

## Extract the poster frame

### API

<CodeGroup labels={["CLI", "TypeScript", "Python", "curl"]}>
```bash
ittybit image \
  -i https://carrier-app.com/campaigns/product-demo.mp4 \
  --start 3 \
  --width 600 \
  --format jpeg \
  --quality high
```

```typescript
const task = {
  input: 'https://carrier-app.com/campaigns/product-demo.mp4',
  kind: 'image',
  options: {
    start: 3,
    width: 600,
    format: 'jpeg',
    quality: 'high',
  },
};

const res = await fetch('https://api.ittybit.com/jobs', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.ITTYBIT_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(task),
});
const data = await res.json();
```

```python

task = {
    "input": "https://carrier-app.com/campaigns/product-demo.mp4",
    "kind": "image",
    "options": {
        "start": 3,
        "width": 600,
        "format": "jpeg",
        "quality": "high",
    },
}

res = requests.post(
    "https://api.ittybit.com/jobs",
    headers={"Authorization": f"Bearer {api_key}"},
    json=task,
)
data = res.json()
```

```bash
TASK='{
  "input": "https://carrier-app.com/campaigns/product-demo.mp4",
  "kind": "image",
  "options": {
    "start": 3,
    "width": 600,
    "format": "jpeg",
    "quality": "high"
  }
}'

curl -X POST https://api.ittybit.com/jobs \
  -H "Authorization: Bearer $ITTYBIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d "$TASK"
```

</CodeGroup>

Use JPEG, not WebP -- email clients have poor WebP support.

### CLI

```bash
ittybit image \
  -i product-demo.mp4 \
  -o email-poster.jpg \
  --start 3 \
  --width 600 \
  --quality high
```

## Why JPEG for email

| Format | Gmail   | Outlook | Apple Mail |
| ------ | ------- | ------- | ---------- |
| JPEG   | Yes     | Yes     | Yes        |
| PNG    | Yes     | Yes     | Yes        |
| WebP   | Partial | No      | Yes        |
| AVIF   | No      | No      | Partial    |

Stick with JPEG for email. Use 600px width -- that's the standard email content width.

## Multiple frames to choose from

Not sure which frame looks best? Extract several and pick:

```bash
ittybit image \
  -i product-demo.mp4 \
  -o frame-01.jpg \
  --start 1 \
  --width 600

ittybit image \
  -i product-demo.mp4 \
  -o frame-03.jpg \
  --start 3 \
  --width 600

ittybit image \
  -i product-demo.mp4 \
  -o frame-05.jpg \
  --start 5 \
  --width 600

ittybit image \
  -i product-demo.mp4 \
  -o frame-10.jpg \
  --start 10 \
  --width 600
```