PHPackages                             floor12/imagenator - 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. floor12/imagenator

ActiveLibrary

floor12/imagenator
==================

PHP library for generate image with a article title to use it in OpenGraph.

1321PHPCI failing

Since Apr 20Pushed 6y ago1 watchersCompare

[ Source](https://github.com/floor12/imagenator)[ Packagist](https://packagist.org/packages/floor12/imagenator)[ RSS](/packages/floor12-imagenator/feed)WikiDiscussions master Synced 5d ago

READMEChangelogDependenciesVersions (1)Used By (0)

floor12/imagenator
==================

[](#floor12imagenator)

[![Build Status](https://camo.githubusercontent.com/43038c9f14076566555dfc02d8fd094959d14c422ea91ba563dac0c925db0767/68747470733a2f2f7472617669732d63692e6f72672f666c6f6f7231322f696d6167656e61746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/floor12/imagenator.svg?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/91e32ab8aeaa6f1bfa5f07360dd29e9e77a47cdcb6488fa5ec79771e23324228/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f666c6f6f7231322f696d6167656e61746f722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/floor12/imagenator/?branch=master)

*Этот файл доступен на [русском языке](README_RU.md).*

Description
-----------

[](#description)

PHP library for generate image with a article title to use it in OpenGraph. It takes PNG image is a background and put text on it. The text position, size, font, color and other parameters. In addition, the library correctly processes "hanging prepositions": it wrap words shorter than 3 letters to the next line, if it exists.

For example:

[![FileInputWidget](https://raw.githubusercontent.com/floor12/imagenator/master/tests/data/example1.png)](https://raw.githubusercontent.com/floor12/imagenator/master/tests/data/example1.png)

[![FileInputWidget](https://raw.githubusercontent.com/floor12/imagenator/master/tests/data/example2.png)](https://raw.githubusercontent.com/floor12/imagenator/master/tests/data/example2.png)

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

[](#installation)

Add this library to your project

```
$ composer require floor12/imagenator
```

or add this to the `require` section of your composer.json.

```
"floor12/imagenator": "dev-master"
```

Using
-----

[](#using)

Pass background PNG file path to the class constructor:

```
use floor12\imagenator\Imagenator;

$imagenator = new Imagenator('/project/images/image.png');
```

Then, you can setup any of additional parameters using some setters:

```
$imagenator
    ->setColor('FF04AB')                    // Font color in HEX format;
    ->setFont('/fonts/SomeFont.ttf')        // Path to custom font;
    ->setFontSize(3)                        // Font size in percent of image height;
    ->setPadding(5)                         // Horizontal padding in percent of image width;
    ->setMarginTopInPercents(50)            // Margin from top image edge in percent of image height;
    ->setRowHeight(7)                       // Row height in percent of image height;
    ->setText('This is an article title.'); // Text to put over the image;
```

After that, you can generate result PNG image:

```
$imagenator->generate('/resultImage.png');
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/8dc98d778cb18db41a1e5b9df722c56f65f655de44fe0d581484cd8dea31b928?d=identicon)[floor12](/maintainers/floor12)

---

Top Contributors

[![floor12](https://avatars.githubusercontent.com/u/8406969?v=4)](https://github.com/floor12 "floor12 (21 commits)")

### Embed Badge

![Health badge](/badges/floor12-imagenator/health.svg)

```
[![Health](https://phpackages.com/badges/floor12-imagenator/health.svg)](https://phpackages.com/packages/floor12-imagenator)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
