The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

Generate awesome open graph images with Open Graphy

Last updated on by

Generate awesome open graph images with Open Graphy image

The Open Graph protocol, initially introduced by Facebook in 2010, is a set of technologies that allows web developers to control how their web pages are represented when shared on social media platforms. By enabling your pages to become "rich" objects in a social graph, Open Graph meta tags dictate the title, description, image, and other vital information that appears in social media previews. This is where Open Graphy steps in: it's a neat Laravel package designed to generate these essential Open Graph images for your application dynamically. Open Graphy helps you to create social cards on the fly, either leveraging its intuitive default templates or allowing you to create your own, ensuring your content always makes a striking impression across social networks.

Main Features

  • Easily generate open graph images for your website.
  • Add a title, an image, and your logo to the Open Graph image.
  • Add a screenshot of the page inside the open graph image to show the preview of the page.
  • 5 different default templates to choose from, stripes, nodes, sunny, verticals and strings.
  • Customize the colours and styles of the templates.
  • Cache the generated images.
  • Create your own template if you want.

Note: Open Graphy requires the Chrome or Chromium browser to be installed on your server to render the images. The README file provides instructions on how to install this on Ubuntu/Debian and MacOS.

Assuming you already have Chrome or Chromium installed, you can then install this package using Composer:

composer require saasykit/laravel-open-graphy

You can also publish the config so you can customize further:

php artisan vendor:publish --tag="open-graphy-config"

Finally, you add the following component to your Blade template in the <head></head> tags:

<x-open-graphy::links title="Laravel News Open Graphy Demo" template="sunny" />

This will output the following:

<meta property="og:image" content="{URL}">
<meta property="og:image:type" content="image/png">
<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="{URL}">

Here is a sample of an Open Graph image generated using Open Graphy with the sunny template and the Laravel News logo:

Learn more about this package and view the source code on GitHub.

Yannick Lyn Fatt photo

Staff Writer at Laravel News and Full stack web developer.

Cube

Laravel Newsletter

Join 40k+ other developers and never miss out on new tips, tutorials, and more.

image
SerpApi

The Web Search API for Your LLM and AI Applications

Visit SerpApi
PhpStorm logo

PhpStorm

The go-to PHP IDE with extensive out-of-the-box support for Laravel and its ecosystem.

PhpStorm
Acquaint Softtech logo

Acquaint Softtech

Acquaint Softtech offers AI-ready Laravel developers who onboard in 48 hours at $3000/Month with no lengthy sales process and a 100 percent money-back guarantee.

Acquaint Softtech
SaaSykit: Laravel SaaS Starter Kit logo

SaaSykit: Laravel SaaS Starter Kit

SaaSykit is a Multi-tenant Laravel SaaS Starter Kit that comes with all features required to run a modern SaaS. Payments, Beautiful Checkout, Admin Panel, User dashboard, Auth, Ready Components, Stats, Blog, Docs and more.

SaaSykit: Laravel SaaS Starter Kit
Shift logo

Shift

Running an old Laravel version? Instant, automated Laravel upgrades and code modernization to keep your applications fresh.

Shift
Lucky Media logo

Lucky Media

Get Lucky Now - the ideal choice for Laravel Development, with over a decade of experience!

Lucky Media
Laravel Cloud logo

Laravel Cloud

Easily create and manage your servers and deploy your Laravel applications in seconds.

Laravel Cloud
Kirschbaum logo

Kirschbaum

Providing innovation and stability to ensure your web application succeeds.

Kirschbaum
Harpoon: Next generation time tracking and invoicing logo

Harpoon: Next generation time tracking and invoicing

The next generation time-tracking and billing software that helps your agency plan and forecast a profitable future.

Harpoon: Next generation time tracking and invoicing
Tinkerwell logo

Tinkerwell

The must-have code runner for Laravel developers. Tinker with AI, autocompletion and instant feedback on local and production environments.

Tinkerwell
SerpApi logo

SerpApi

Access real-time search engine results through a simple API—no more scraping headaches! Use it for AI applications, SEO tools, product research, travel information, and more

SerpApi
Get expert guidance in a few days with a Laravel code review logo

Get expert guidance in a few days with a Laravel code review

Expert code review! Get clear, practical feedback from two Laravel devs with 10+ years of experience helping teams build better apps.

Get expert guidance in a few days with a Laravel code review

The latest

View all →
Larapanda: A Type-Safe Lightpanda Browser SDK for Laravel image

Larapanda: A Type-Safe Lightpanda Browser SDK for Laravel

Read article
Generate HTML Password Rules Attribute in Laravel 13.9.0 image

Generate HTML Password Rules Attribute in Laravel 13.9.0

Read article
DHH Joins Laravel Live Denmark 2026 for Fireside Chat with Taylor Otwell image

DHH Joins Laravel Live Denmark 2026 for Fireside Chat with Taylor Otwell

Read article
Model-Based Scheduling for Laravel with Cadence image

Model-Based Scheduling for Laravel with Cadence

Read article
Laravel's AI SDK adds sub-agents image

Laravel's AI SDK adds sub-agents

Read article
Laravel Introduces First-Party Passkey Authentication Support image

Laravel Introduces First-Party Passkey Authentication Support

Read article