PHPackages                             fractal512/og-image - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. fractal512/og-image

ActiveLibrary[Image &amp; Media](/categories/media)

fractal512/og-image
===================

Open Graph image generator based on Intervention Image - PHP image processing library

0.2(1y ago)01.2k↓48.2%1MITPHPPHP ^8.1

Since Mar 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/fractal512/og-image)[ Packagist](https://packagist.org/packages/fractal512/og-image)[ Docs](https://github.com/fractal512/og-image)[ RSS](/packages/fractal512-og-image/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (1)

Open Graph Image Generator
==========================

[](#open-graph-image-generator)

Open Graph image generator based on Intervention Image - PHP image processing library.

[![OG image preview](/docs/assets/og-image-example.png?raw=true)](/docs/assets/og-image-example.png?raw=true)

[![Packagist Version](https://camo.githubusercontent.com/7f1c2f49c92e3519ab916d88fb33f22c0a665e128bc959a670b847a7b456e6d7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6672616374616c3531322f6f672d696d616765)](https://packagist.org/packages/fractal512/og-image "Packagist Version")[![Tests](https://github.com/fractal512/og-image/actions/workflows/tests.yml/badge.svg)](https://github.com/fractal512/og-image/actions/workflows/tests.yml)[![Packagist PHP Version Support](https://camo.githubusercontent.com/def4c3137f4766fe25fcd0587a6a7c167945d9285746abf9992651f62a43dba9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6672616374616c3531322f6f672d696d616765)](https://www.php.net/ "PHP version")[![GitHub License](https://camo.githubusercontent.com/aed342f4c411f31b77a79b36dae244d7f8cabda52b306dda6aef329ed9285eb2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6672616374616c3531322f6f672d696d616765)](https://github.com/fractal512/og-image/blob/master/LICENSE "License")

Features:
---------

[](#features)

- Image generation with fully customizable text, logo, background and overlay
- Background image effects, like a blur, grayscale, etc.
- Custom fading overlay over background
- Easy switch between GD and Imagick drivers

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- [Intervention Image](https://image.intervention.io/v3) 3.0 or higher

Installation
------------

[](#installation)

The package can be installed via composer:

```
composer require fractal512/og-image
```

For the [Laravel](https://laravel.com/) framework use [fractal512/laravel-og-image](https://github.com/fractal512/laravel-og-image) package.

Usage
-----

[](#usage)

Use `make()` method to create Open Graph image, overriding default settings with needed in `$config` array before:

```
