Integrations/Contentful
Contentful

Auto-generate screenshots in Contentful

Enrich your content model with automatically captured website screenshots

Connect Allscreenshots to Contentful to automatically generate and store website screenshots as media assets. When editors add a URL to a content entry, a screenshot is captured and linked automatically — keeping your visual content always current.

How it works

Get started in 4 steps

1

Add a URL field

Add a short text or URL field to your Contentful content type.

2

Set up a webhook

Configure a Contentful webhook that fires when entries are published.

3

Capture and upload

Your handler captures the screenshot and uploads it as a Contentful asset.

4

Link the asset

Update the content entry to reference the new screenshot asset.

</>Code Example

Contentful Webhook Handler

javascript
1import contentful from 'contentful-management';
2
3const client = contentful.createClient({
4  accessToken: process.env.CONTENTFUL_MGMT_TOKEN,
5});
6
7export async function POST(request) {
8  const { fields, sys } = await request.json();
9  const url = fields.websiteUrl?.['en-US'];
10  if (!url) return Response.json({ skipped: true });
11
12  // Capture screenshot
13  const response = await fetch(
14    'https://api.allscreenshots.com/v1/screenshot',
15    {
16      method: 'POST',
17      headers: {
18        'Authorization': `Bearer ${process.env.SCREENSHOT_API_KEY}`,
19        'Content-Type': 'application/json',
20      },
21      body: JSON.stringify({ url, fullPage: false }),
22    }
23  );
24  const { screenshotUrl } = await response.json();
25
26  // Create asset in Contentful
27  const space = await client.getSpace(process.env.CONTENTFUL_SPACE_ID);
28  const env = await space.getEnvironment('master');
29
30  const asset = await env.createAsset({
31    fields: {
32      title: { 'en-US': `Screenshot: ${url}` },
33      file: {
34        'en-US': {
35          contentType: 'image/png',
36          fileName: `screenshot-${sys.id}.png`,
37          upload: screenshotUrl,
38        },
39      },
40    },
41  });
42
43  await asset.processForAllLocales();
44  return Response.json({ assetId: asset.sys.id });
45}
Benefits

Why use Allscreenshots with Contentful

Automated asset creation

Screenshots are created as Contentful assets automatically — no manual upload needed.

Content model integration

Screenshot assets link directly to your content entries for a clean data model.

Editor-friendly

Editors just enter a URL. The screenshot appears as a linked asset without any technical knowledge.

Frequently asked questions

Go to Settings > Webhooks in your Contentful space and add a webhook URL. Set it to trigger on Entry publish events.

Pricing that scales with you

No hidden fees. No surprises. Just screenshots.

100 free screenshots on sign-up · 50 bonus for each friend you invite

Starter

$18/mo
  • 1,500 screenshots/mo
  • 50/min rate limit
  • $0.009 overage
  • All features included
Get Started
Most Popular

Pro

$45/mo
  • 7,500 screenshots/mo
  • 100/min rate limit
  • $0.009 overage
  • All features included
Get Started

Business

$149/mo
  • 30,000 screenshots/mo
  • 200/min rate limit
  • $0.0075 overage
  • All features included
Get Started

Enterprise

$329/mo
  • 100,000 screenshots/mo
  • 400/min rate limit
  • $0.005 overage
  • All features included
Get Started

Ready to integrate with Contentful?

Start with 100 free screenshots every month. No credit card required.