# Forum thread OG image template

A community question in a speech bubble pointing at its asker, with votes, replies, tags and a solved badge.

- Slug: `forum-thread`
- Preview (real render): https://shareglint.com/storage/template-previews/forum-thread.jpg
- Page: https://shareglint.com/en/templates/forum-thread

For forums, Q&A communities and support boards that want a card per thread. The badge appears only when `solved` is yes, at most three tags are shown, and an asker without a photo gets their initial. Long titles shrink to fit and the excerpt is cut at two lines on wide frames. Wide and square frames put the vote counter beside the bubble; vertical frames move it above the bubble and give the question the full width.

## Fields

Every field is optional. Long text shrinks to fit instead of overflowing; an image field takes a public URL that we fetch on our side.

| Field | Type | Description | Example |
|---|---|---|---|
| `title` | text | The question or thread title. (default: Thread title) | How do I keep a Postgres advisory lock alive across queue retries? |
| `excerpt` | text | First lines of the post, under the title. | The worker takes the lock, the job fails and retries on another worker, and the lock is gone. Is there a pattern for this? |
| `author` | text | Name or handle of the asker. | maria.dev |
| `community` | text | Community name next to the logo. | Northwind Community |
| `votes` | text | Vote count in the counter. | 128 |
| `replies` | text | Number of replies, next to the speech-bubble icon. | 14 |
| `tags` | text | Tags separated by `;`, e.g. postgres;queues;laravel. Up to three. | postgres;queues;laravel |
| `solved` | text | yes shows the solved badge, no hides it. (default: no) | yes |
| `solved_label` | text | Text of the badge, e.g. Solved. (default: Solved) | Solved |
| `avatar` | image URL | Asker's photo, round. | https://example.com/images/avatar-woman2.jpg |
| `logo` | image URL | Community logo, square. | https://example.com/images/logo-m.png |
| `accent` | colour | Brand colour as hex, e.g. #6366f1. Drives buttons, highlights and the background glow. (default: #f97316) | #f97316 |
| `theme` | dark | light | Colour scheme: dark or light. (default: light) | — |

## Render it with one request

```bash
curl -X POST "https://shareglint.com/v1/images?wait=true" \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template": "forum-thread",
    "modifications": {
        "title": "How do I keep a Postgres advisory lock alive across queue retries?",
        "excerpt": "The worker takes the lock, the job fails and retries on another worker, and the lock is gone. Is there a pattern for this?",
        "author": "maria.dev",
        "community": "Northwind Community",
        "votes": "128",
        "replies": "14",
        "tags": "postgres;queues;laravel",
        "solved": "yes",
        "solved_label": "Solved",
        "avatar": "https://example.com/images/avatar-woman2.jpg",
        "logo": "https://example.com/images/logo-m.png"
    }
}'
```

## Make it yours

accent and theme change per request. For anything more, copy the template into your account: you get an ordinary HTML template with the same fields that you can edit in the dashboard or through the API. If the slug is free on your account, the copy takes it — your integrations switch to your version without changing a line.

```bash
curl -X POST "https://shareglint.com/v1/templates/library/forum-thread/copy" -H "Authorization: Bearer sk_live_YOUR_KEY"
```
