shareglint / shareglint-php
PHP client for Shareglint — generate Open Graph images over HTTP
v1.0.0
2026-11-21 14:59 UTC
Requires
- php: >=8.2
- ext-curl: *
- ext-json: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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
- Docs and API reference: https://shareglint.com/en/docs
- Templates: https://shareglint.com/en/templates
- Laravel integration:
shareglint/laravel
Free plan: 100 images a month (watermarked), no card. MIT licensed.