OG Image Editor: Create, Export, and Publish Link Preview Images
Learn what an OG image editor does, how to design a 1200×630 preview, export it, add metadata, and automate screenshots with ScreenshotNeo.
An OG image editor creates the visual image shown when a page is shared on social networks and messaging apps. It may export a PNG or connect to a publishing workflow, but it does not automatically create the entire social preview. A complete preview also needs a page title, description, URL, and Open Graph metadata.
What an OG image editor does
Most editors provide a canvas, background controls, text layers, image placement, and an export action. Common workflows fall into four groups:
| Workflow | Best for | What you receive |
|---|---|---|
| Standalone canvas | One-off announcements or articles | Usually a downloaded PNG |
| Content-fed template | Sites publishing many posts | A reusable design populated from title, author, date, or image fields |
| Coding-assistant or API workflow | Automated generation in a build pipeline | Images or SVGs generated from code, templates, or data |
| General image editor | Resizing, cropping, compression, and format conversion | An edited image with an OG preset |
Vendor pages describe all four patterns. Treat feature, privacy, and integration claims as claims from those vendors rather than independent test results.
Choose a canvas size and format
1200×630 pixels is the most commonly described OG output in the tools reviewed. It is a practical default, not a universal requirement. Some editors also support square or panoramic canvases. Confirm the target platform’s current guidance before publishing.
- Start with 1200×630 for a general-purpose link preview.
- Keep important text away from the edges so platform crops do not remove it.
- Use PNG for crisp typography and transparent graphics; use JPEG or WebP when file size matters and transparency is unnecessary.
- Export at the exact dimensions you intend to reference in metadata.
Design an OG image that remains readable
- Write one short headline. Use a clear hierarchy with a large title and a smaller label or author line.
- Choose a background with sufficient contrast. Add a solid or translucent panel behind text when a photograph is busy.
- Use one focal image or illustration. Crop it deliberately rather than allowing an automatic crop to cut off the subject.
- Reserve a consistent area for brand colors, a logo, or a category tag.
- Check the design at thumbnail size. If the title cannot be read when the image is small, shorten it or increase contrast.
- Export and inspect the actual PNG rather than relying only on the editor canvas.
Build a simple OG image yourself with HTML and Canvas
This browser-only example creates a 1200×630 PNG without a third-party editor. Save it as og-editor.html, open it in a browser, and click the button. Replace the text, colors, and image URL for your page.
<!doctype html>
<meta charset="utf-8">
<title>OG image editor</title>
<button id="download">Download PNG</button>
<canvas id="canvas" width="1200" height="630"></canvas>
<script>
const canvas = document.querySelector('#canvas');
const ctx = canvas.getContext('2d');
function draw() {
const w = canvas.width, h = canvas.height;
ctx.fillStyle = '#101828';
ctx.fillRect(0, 0, w, h);
ctx.fillStyle = '#7f56d9';
ctx.fillRect(0, 0, 24, h);
ctx.fillStyle = '#98a2b3';
ctx.font = '700 28px Arial, sans-serif';
ctx.fillText('ENGINEERING GUIDE', 90, 100);
ctx.fillStyle = '#ffffff';
ctx.font = '700 72px Arial, sans-serif';
const lines = ['OG Image Editor:', 'create better previews'];
lines.forEach((line, i) => ctx.fillText(line, 90, 220 + i * 90));
ctx.fillStyle = '#d0d5dd';
ctx.font = '32px Arial, sans-serif';
ctx.fillText('A 1200 × 630 Open Graph image', 90, 430);
ctx.fillStyle = '#7f56d9';
ctx.beginPath();
ctx.arc(1040, 315, 150, 0, Math.PI * 2);
ctx.fill();
}
draw();
document.querySelector('#download').addEventListener('click', () => {
const link = document.createElement('a');
link.download = 'og-image.png';
link.href = canvas.toDataURL('image/png');
link.click();
});
</script>
For production use, load remote images only after they have finished loading. Images from another origin must provide suitable CORS headers or the browser will block toDataURL() on a tainted canvas.
Connect the exported image to your page
Upload the PNG to a stable, publicly reachable URL, then add metadata in the page’s <head>. The image file alone does not publish a preview.
<meta property="og:title" content="OG Image Editor: Create Better Previews">
<meta property="og:description" content="A practical guide to designing and publishing link preview images.">
<meta property="og:url" content="https://example.com/guides/og-image-editor">
<meta property="og:type" content="article">
<meta property="og:image" content="https://cdn.example.com/og/og-image-editor.png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:image:alt" content="An editor canvas showing an Open Graph preview design">
Use an absolute HTTPS image URL. Keep the image available to crawlers without an authentication step, and update the URL or cache policy when you replace the asset.
Automate content-driven OG images
A reusable template can take variables such as title, tag, author, date, reading time, main image, avatar, and logo. Render one image per article during your build or publishing step. Validate that long titles wrap, missing images have a fallback, and user-provided text is escaped before it is inserted into HTML or SVG.
For a coding-assistant workflow, vendor documentation describes MCP-connected image generation, styled diagrams, Vega-Lite charts, QR codes, social images, SVG templates, automatic alt text, a REST API, and a CLI. Those are vendor-described capabilities; verify current support before choosing one for a production pipeline.
Preview and validate before publishing
- Open the exported file directly and verify dimensions, sharpness, and color.
- Fetch the public image URL from a clean browser session to confirm it does not require cookies or a login.
- Inspect the final HTML source, not only client-rendered DOM, when your crawler depends on server-rendered metadata.
- Check that
og:title,og:description,og:url, andog:imagedescribe the same page. - Test a page update with a changed image URL if a platform continues showing an older cached preview.
Or skip the browser setup
If your source is a rendered page or template, [ScreenshotNeo](https://screenshotneo.com) can capture the finished visual through one API request. It accepts options for full-page or element capture, custom CSS and JavaScript, waits, device and viewport settings, dark mode, cookies and headers, and image output formats. See the [ScreenshotNeo API docs](https://screenshotneo.com/docs/) for the complete option list.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
Cookie banners, newsletter popups, and chat widgets are removed before the shot. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers. An MCP server lets AI agents use take_screenshot, get_page_info, and capture_pdf. The Free plan includes 1,000 screenshots each month with no card; paid plans start at $5 for 3,000. [Create a free ScreenshotNeo account](https://screenshotneo.com/account/sign-up/).
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Preview has no image | og:image is missing, relative, blocked, or private |
Use an absolute public HTTPS URL and check it without a session cookie. |
| Old image still appears | Social crawler cache | Change the image URL or use the platform’s refresh/debug tool. |
| Text is clipped | Title is too long or positioned near an edge | Wrap or shorten the title and keep a safe margin. |
| Canvas export throws a security error | Cross-origin image without CORS permission | Serve the image with appropriate CORS headers or proxy it through your own origin. |
| Fonts differ in production | Font was unavailable when rendering | Load and await the font before drawing, or use a reliably installed fallback. |
| Screenshot contains a popup | The page was captured before dismissal or hiding rules ran | Use a selector wait, click action, custom CSS, or ScreenshotNeo’s consent and widget removal. |
| Screenshot is blank or timed out | Page failed, requires authentication, or never reaches a stable state | Check the URL, headers, cookies, wait condition, and network dependencies. |
Performance, reliability, and cost
- Generate static images at publish time when content changes rarely; cache the resulting URL.
- Use a content hash in filenames so updates invalidate caches without changing unrelated pages.
- Keep source assets reasonably sized and avoid loading unnecessary third-party scripts in a render route.
- For screenshot automation, set an explicit timeout, wait for a meaningful selector or network idle, and retry only transient failures.
- Track whether a capture was clean, failed, cached, or blocked. ScreenshotNeo returns verdict and billing headers so you can distinguish those cases.
- Estimate usage from the number of pages, locales, breakpoints, and regeneration events. ScreenshotNeo bills only clean shots; bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing.
FAQ
Does an OG image editor generate the entire social preview?
No. It creates or exports the image. The page still needs title, description, URL, and metadata.
Is 1200×630 mandatory?
No. It is a widely used default in the reviewed tools. Check the requirements of the destination platform and any alternate square or panoramic workflow.
Should every article have a unique OG image?
Usually yes for sharing clarity. A reusable template can keep branding consistent while changing the title, category, and article image.
Can I use an OG image editor without a design account?
Some standalone tools state that they export PNGs without an account. Account, storage, and integration rules vary by product.
Can ScreenshotNeo create the design?
ScreenshotNeo captures a rendered page or element. Build the design in HTML, CSS, or an editor first, then capture the result automatically.


