Open Graph images for any PHP site
A few lines in your shared <head> template. The path is read from each request, so every page gets its own image.
Make your preview
Paste your site, pick a design and publish. Open Add to site → PHP for a snippet with your site ID.

Paste into your layout
Put it in the file every page includes — header.php, layout.php or your base template.
<?php
$path = trim((string) parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/');
$image = htmlspecialchars('https://getwowimg.com/a1b2c3d4e5/' . ($path === '' ? 'index' : $path) . '.png', ENT_QUOTES, 'UTF-8');
?>
<meta property="og:image" content="<?= $image ?>" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="<?= $image ?>" />a1b2c3d4e5 is a sample site ID — Add to site gives you the code with yours.Using Blade or Twig?
Same idea: build the path from the request and print the tags in the base layout.
@php($path = trim(request()->path(), '/') ?: 'index')
<meta property="og:image" content="https://getwowimg.com/a1b2c3d4e5/{{ $path }}.png" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:image" content="https://getwowimg.com/a1b2c3d4e5/{{ $path }}.png" />a1b2c3d4e5 is a sample site ID — Add to site gives you the code with yours.Optional: see what your shares bring
Keep the visit script and Analytics counts the visits your shared links bring, and from which apps: X, LinkedIn, Facebook, WhatsApp, Telegram. A new page also gets its image on its first visit, before anyone shares it. No cookies, no visitor IDs. The snippet ends with this script line while Track visits from shares is on in Add to site, as it is by default. It’s the same on every page.
<script async src="https://getwowimg.com/v.js" data-site="a1b2c3d4e5"></script>a1b2c3d4e5 is a sample site ID — Add to site gives you the code with yours.Before and after
Questions
WordPress is PHP too — should I use this?
No, use the WordPress plugin: it works through Yoast and Rank Math without editing your theme's head.
I already have og:image tags.
Remove them from the template, or social apps may pick the old picture.
Does the query string matter?
No. We ignore it — /page?utm=x and /page get the same image.
Try it on your site
Three designs made from your site — no sign-up to try.