spatie

Generate OG images for your Laravel app

20
1
100% credibility
Found Feb 27, 2026 at 17 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
PHP
AI Summary

A Laravel package that automatically generates and serves Open Graph images for social media previews from inline HTML templates in Blade views.

How It Works

1
💭 Want better social shares

You see your website links showing boring previews on social media and dream of custom eye-catching images instead.

2
🔍 Discover the tool

You find this simple tool that lets you create beautiful preview images right from your page designs.

3
📦 Add it easily

You add the tool to your website with a quick setup so it's ready to use.

4
🎨 Design your image

You wrap a stunning design in a special section on your pages, using your usual colors and fonts.

5
👀 Preview right away

Just add a question mark and 'ogimage' to any page URL to instantly see how the preview image looks.

6
🚀 Images generate automatically

When someone shares your link, the tool creates the perfect image on the spot and saves it for next time.

Stunning shares everywhere

Your links now pop with custom previews on every social platform, grabbing attention and boosting clicks.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 17 to 20 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is laravel-og-image?

This PHP package for Laravel apps lets you generate dynamic Open Graph images directly from Blade templates using a simple component like ``. It solves the hassle of static OG images or pricey external APIs by screenshotting your HTML at 1200x630 pixels, inheriting your site's CSS, fonts, and Vite assets, then caching and serving them via a dedicated route like `/og-image/{hash}.jpeg`. Everything runs locally on your server—no logins, no third-party dependencies beyond a Chrome binary.

Why is it gaining traction?

Unlike free AI image generators or tools needing logins, it produces OG images locally and for free, perfect for generate images without login or generate images locally setups. Developers love the zero-config Blade integration, preview mode via `?ogimage` on any page, and CLI commands like `og-image:generate` for pre-building images or `og-image:clear` to nuke caches. It stands out by avoiding API limits, supporting formats like JPEG/WebP, and handling concurrency locks for reliable generation.

Who should use this?

Laravel full-stack devs building blogs, docs sites, or SaaS dashboards needing social previews for dynamic content like post titles or user stats. It's ideal for teams generate github profile picture-style assets or release notes visuals without Photoshop, especially if you're already using Vite and want self-hosted generate images ai free alternatives. Avoid if you're not on Laravel or lack Node/Chrome.

Verdict

Try it if you're in the Laravel ecosystem—Spatie delivers polished tools despite 16 stars and 1.0% credibility score signaling early maturity. Docs are solid, tests pass, but watch for edge cases in high-traffic deploys; pre-generate images via CLI to stay safe.

(198 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.