# Give every blog post and page its own Open Graph image

> Create a unique OG image for each page from its title: in bulk from a spreadsheet for the pages you have, and through the API or a webhook for every new one.

- **URL**: https://templated.io/workflows/og-images-for-blog-posts/

---

Stop sharing every link with the same generic preview. Each page gets an OG image with its own title, in bulk for old pages and automatically for new ones.

[Start free](https://app.templated.io/signup) · [See the setup](https://templated.io/workflows/og-images-for-blog-posts/#how-to-run)

50 free credits. No credit card required.

1. When

   Your CMS

   Page list or new post

2. Templated

   Render PNG

   1200 × 630 OG image

3. Then

   Your CMS

   og:image tag

## At a glance

When a site uses one default `og:image`, every shared link looks the same on LinkedIn, Slack and X, and none of them says what the page is about.

Fix the pages you already have in one batch: list them in a spreadsheet and render an image per row. Then cover new posts from now on, either by calling the API when you publish or by sending your CMS's publish webhook to Templated.

- Trigger

  Your CMS: Page list or new post

- Output

  PNG, 1200 × 630 OG image

- Delivered to

  Your CMS: og:image tag

- Run it with

  Spreadsheet generation, REST API, Inbound webhooks

- Cost

  1 credit per image (each page of a multi-page template counts as one)

- Free plan

  50 credits, no credit card required

## How it works

Three steps, from the event to the finished file.

1. ### List the pages, or catch new ones

   A spreadsheet of titles for the backlog. Your build script or CMS webhook for new posts.

2. ### Templated renders 1200 × 630

   Title, category and author fill your OG template.

3. ### Set the og:image

   Put the render URL in the page's `og:image` and `twitter:image` tags or the CMS's social image field.

## Map your data to the template

Each dynamic layer in your template gets its value from one field. Name your layers like this, or map whatever names you use.

| Template layer | Comes from | Example |
| - | - | - |
| title | Page title | Pricing that scales with your team |
| category | Section or category | Guides |
| url | Path or domain | yoursite.com/pricing |

Text layers take `text`, image layers take `image_url`. You can also change colors, hide layers or swap fonts per render. [See every layer property](https://templated.io/docs/renders/create/).

## Templates for this workflow

Start from one of these and make it yours in the editor, import a Canva design, or describe one to the AI template generator.

- ![Blue Dynamic Simple Open Graph Template preview](https://templated-assets.s3.amazonaws.com/public/thumbnail/dcf19ca8-cf4f-46bd-95ec-db10b5e38809.webp)

  ### [Blue Dynamic Simple Open Graph Template](https://templated.io/templates/open-graph/blue-dynamic-simple-open-graph-template/)

- ![Orange Simple Open Graph Template preview](https://templated-assets.s3.amazonaws.com/public/thumbnail/09b06472-6997-4b3d-9d4a-35622fecb07c.webp)

  ### [Orange Simple Open Graph Template](https://templated.io/templates/open-graph/orange-simple-open-graph-template/)

- ![Red Beige Simple Open Graph Template preview](https://templated-assets.s3.amazonaws.com/public/thumbnail/919d1685-852c-4835-bdbb-874c9ebccde7.webp)

  ### [Red Beige Simple Open Graph Template](https://templated.io/templates/open-graph/red-beige-simple-open-graph-template/)

[Browse all templates](https://templated.io/templates/) · [Generate one with AI](https://templated.io/ai-template-generator/)

## When to use it

- Sites still sharing one default preview image.
- Docs, changelogs and blogs with many pages.
- Programmatic SEO pages that need unique previews at scale.

## Tips

- Render once per page and store the URL. Render URLs don't expire, so there is no need to render on every request.
- Keep titles under about 60 characters on the image, or turn on auto-fit for the title layer.
- After you deploy, check the preview with LinkedIn Post Inspector, since networks cache old images.

## How to run it

Pick the tool you already use. The first one is the quickest way to set this up.

### Spreadsheet generation

In the dashboard, no code

1. Export your page titles and URLs to CSV (from your sitemap, CMS or SEO tool).
2. Upload the file in **Spreadsheet generation**, map the title column and render the batch.
3. Download the ZIP and add the images to your site, one per page.

[More about Spreadsheet generation](https://templated.io/integrations/spreadsheet/)

### REST API

From your own code

1. In your build or publish step, call `POST /v1/render` with the post title.
2. Save the returned URL with the post (front matter, CMS field or database).
3. Output it in the `og:image` meta tag.

cURL

```
curl -X POST https://api.templated.io/v1/render \
  -H "Authorization: Bearer $TEMPLATED_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "template": "YOUR_TEMPLATE_ID",
  "format": "png",
  "layers": {
    "title": {
      "text": "Pricing that scales with your team"
    },
    "category": {
      "text": "Guides"
    },
    "url": {
      "text": "yoursite.com/pricing"
    }
  }
}'
```

[API documentation](https://templated.io/docs/)

### Inbound webhooks

A URL any app can call

1. Create a Templated [inbound webhook](https://templated.io/integrations/webhooks/) on your OG template and map the title path from your CMS's publish payload.
2. Add the webhook URL to the CMS's publish webhooks, and a callback URL to receive the render and save it to the post.

[More about Inbound webhooks](https://templated.io/integrations/webhooks/)

## Step-by-step guides

- [Automate Open Graph Image Generation with Templated in 5 Minutes](https://templated.io/blog/automate-open-graph-image-generation-with-templated-in-5-minutes/)

## Related workflows

- ### [Share every new blog post with its own branded image](https://templated.io/workflows/blog-posts-to-social-images/)

  Publish the article and you are done: the RSS feed triggers a branded share image with the title, and the post goes out on your channels.

  Run with: Zapier, Make, n8n

- ### [Announce every GitHub release with a branded card](https://templated.io/workflows/github-release-announcement-cards/)

  Tag the release and the announcement is done: a card with the version and the highlights goes to your community channels.

  REST API, n8n, Zapier

- ### [Personalize email images for every contact](https://templated.io/workflows/personalized-email-images/)

  An image with the reader's own name in it: one render per contact, its URL saved to a contact field, dropped into the email with a merge tag.

  Make, Zapier, n8n, REST API

[See all workflows](https://templated.io/workflows/)

## Set up your first workflow today

Create a template, connect your tool and render your first image in minutes.

50 free credits. No credit card required.

[Start free](https://app.templated.io/signup)
