Search by

shareglint / shareglint-php

dziulatex

PHP client for Shareglint — generate Open Graph images over HTTP

Package info

github.com/dziulatex/shareglint-php

pkg:composer/shareglint/shareglint-php

Statistics

Installs: 2

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-11-21 14:59 UTC

This package is auto-updated.

Last update: 2026-11-21 15:00:57 UTC


README

PHP client for Shareglint: render Open Graph and social images from HTML templates, take website screenshots and build signed og:image URLs. Only needs cURL — no Guzzle, no other dependencies. PHP 8.2+.

composer require shareglint/shareglint-php

Render an image

use Shareglint\Shareglint;

$client = new Shareglint(getenv('SHAREGLINT_API_KEY'));

$render = $client->render('blog-og', [
    'title' => 'How we cut our build time in half',
    'author' => 'Ada Lovelace',
]);

echo $render->url; // https://shareglint.com/storage/renders/…png

render() waits for the image. queue() returns at once and calls your webhook; renderSizes() renders one template in several sizes (og, square, story…); screenshot() captures a web page.

Signed og:image URLs (no API call at page load)

$url = Shareglint::signedUrl(
    accountId: getenv('SHAREGLINT_ACCOUNT_ID'),
    template: 'blog-og',
    params: ['title' => $post->title],
    signingSecret: getenv('SHAREGLINT_SIGNING_SECRET'),
);
// <meta property="og:image" content="<?= htmlspecialchars($url) ?>">

The first request renders the image; later ones are served from cache.

Links

Free plan: 100 images a month (watermarked), no card. MIT licensed.