Code review at scale is broken. Here’s how Augment Code is fixing it.

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
Bacancy

Outsource a dedicated Laravel developer for $3,200/month. With over a decade of experience in Laravel development, we deliver fast, high-quality, and cost-effective solutions at affordable rates.

Visit Bacancy
Curotec logo

Curotec

World class Laravel experts with GenAI dev skills. LATAM-based, embedded engineers that ship fast, communicate clearly, and elevate your product. No bloat, no BS.

Curotec
Bacancy logo

Bacancy

Supercharge your project with a seasoned Laravel developer with 4-6 years of experience for just $3200/month. Get 160 hours of dedicated expertise & a risk-free 15-day trial. Schedule a call now!

Bacancy
Tinkerwell logo

Tinkerwell

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

Tinkerwell
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
PhpStorm logo

PhpStorm

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

PhpStorm
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
Shift logo

Shift

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

Shift
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
Lucky Media logo

Lucky Media

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

Lucky Media
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

The latest

View all →
Bagisto Visual: Theme Framework with Visual Editor for Laravel E-commerce image

Bagisto Visual: Theme Framework with Visual Editor for Laravel E-commerce

Read article
Automate Laravel Herd Worktrees with This Claude Code Skill image

Automate Laravel Herd Worktrees with This Claude Code Skill

Read article
Laravel Boost v2.0 Released with Skills Support image

Laravel Boost v2.0 Released with Skills Support

Read article
Laravel Debugbar v4.0.0 is released image

Laravel Debugbar v4.0.0 is released

Read article
Radiance: Generate Deterministic Mesh Gradient Avatars in PHP image

Radiance: Generate Deterministic Mesh Gradient Avatars in PHP

Read article
Speeding Up Laravel News With Cloudflare image

Speeding Up Laravel News With Cloudflare

Read article