PHPackages                             flayyer/flayyer - 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. flayyer/flayyer

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

flayyer/flayyer
===============

PHP helpers to create FLYYER image URLs

2.1.2(4y ago)613[1 PRs](https://github.com/useflyyer/flyyer-php/pulls)MITPHPPHP ^7.1

Since Aug 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/useflyyer/flyyer-php)[ Packagist](https://packagist.org/packages/flayyer/flayyer)[ Docs](https://github.com/useflyyer/flyyer-php)[ RSS](/packages/flayyer-flayyer/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (2)Versions (13)Used By (0)

flyyer-php
==========

[](#flyyer-php)

The AI-powered preview system built from your website (no effort required).

[![Flyyer live image](https://github.com/useflyyer/create-flyyer-app/raw/master/.github/assets/website-to-preview.png?raw=true&v=1)](https://github.com/useflyyer/create-flyyer-app/blob/master/.github/assets/website-to-preview.png?raw=true&v=1)

**This package is agnostic to any PHP framework.**

Index
-----

[](#index)

- [Get started (5 minutes)](#get-started-5-minutes)
- [Advanced usage](#advanced-usage)
- [Flyyer Render](#flyyer-render)
- [Development](#development)
- [Test](#test)

Get started (5 minutes)
-----------------------

[](#get-started-5-minutes)

Haven't registered your website yet? Go to [Flyyer.io](https://flyyer.io?ref=flyyer-php) and create a project (e.g. `website-com`).

### 1. Install the library

[](#1-install-the-library)

This package supports PHP &gt;= 7.1.

```
composer require flyyer/flyyer
```

### 2. Get your Flyyer.io smart image link

[](#2-get-your-flyyerio-smart-image-link)

In your website code (e.g. your landing or product/post view file), set the following:

```
$flyyer = new Flyyer(
  // Your project slug
  'website-com',
  // The current path of your website
  '/path/to/product', // in Laravel 6 you can use `Route::getCurrentRoute()->getName()`
);
// (Optional, Recommended) Default or main image for each page
$flyyer->default = "/static/image-1.png" # or https://your-site.com/static/image-1.png

// Check:
print($flyyer->href());
// > https://cdn.flyyer.io/v2/website-com/_/__v=1618281823&_def=%2Fstatic%2Fimage-1.png/path/to/product
```

### 3. Put your smart image link in your `` tags

[](#3-put-your-smart-image-link-in-your-head-tags)

You'll get the best results like this:

```

```

### 4. Create a `rule` for your project

[](#4-create-a-rule-for-your-project)

Go to your dashboard [here](https://flyyer.io/dashboard/_/projects/_/manage) and create a rule like the following:

[![Flyyer basic rule example](https://github.com/useflyyer/create-flyyer-app/raw/master/.github/assets/rule-example.png?raw=true&v=1)](https://flyyer.io/dashboard)

Voilà!

Advanced usage
--------------

[](#advanced-usage)

Here you have a detailed full example for project `website-com` and path `/path/to/product`.

Advanced features include:

- Custom variables: additional information for your preview that is not present in your website. \[Note: if you need customization you should take a look at [Flyyer Render](#flyyer-render)\]
- Custom metadata: set custom width, height, resolution, and more (see example).
- Signed URLs.

```
$flyyer = new Flyyer(
  // [Required] Your project slug, find it in your dashboard https://www.flyyer.io/dashboard/_/projects/_/integrate.
  'website-com',
  // [Recommended] The current path of your website (by default it's `/`).
  '/path/to/product',
  // [Optional] In case you want to provide information that is not present in your page set it here.
  [
    'title' => 'Product name',
    'img' => 'https://flyyer.io/img/marketplace/flyyer-banner.png'
  ],
  // [Optional] Custom metadata for rendering the image. ID is recommended so we provide you with better statistics.
  [
    'id' => 'jeans-123', // recommended for better stats
    'v' => '12369420123', // specific handler version, by default it's a random number to circumvent platforms' cache,
    'width' => 1200,
    'height' => 600,
    'resolution' => 0.9, // from 0.0 to 1.0
    'agent' => 'whatsapp', // force dimensions for specific platform
  ]);

// Use this image in your  tags (og:image & twitter:image)
print($flyyer->href());
// > https://cdn.flyyer.io/v2/website-com/_/__id=jeans-123&__v=1618281823&img=https%3A%2F%2Fflyyer.io%2Fimg%2Fmarketplace%2Fflyyer-banner.png&title=Product+name/path/to/product
```

For signed URLs, just provide your secret (find it in Dashboard &gt; Project &gt; Advanced settings) and choose a strategy (`HMAC` or `JWT`).

```
$flyyer = new Flyyer(
  'website-com',
  '/path/to/product',
  [],
  [ 'id' => 'jeans-123' ],
  'your-secret-key',
  'JWT', // or 'HMAC'
);

$url = $flyyer->href();
// > https://cdn.flyyer.io/v2/website-com/jwt-eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXJhbXMiOnsiX19pZCI6ImplYW5zLTEyMyJ9LCJwYXRoIjoiXC9wYXRoXC90b1wvcHJvZHVjdCJ9.X8Vs5SGEA1-3M6bH-h24jhQnbwH95V_G0f-gPhTBTzE?__v=1618283086
```

Flyyer Render
-------------

[](#flyyer-render)

As you probably realized, **Flyyer** uses the [rules defined on your dashboard](https://flyyer.io/dashboard/_/projects) to decide how to handle every image based on path patterns. It analyses your website to obtain information and then render a content-rich image with no effort. Let's say *"Flyyer delivers images based on the content of this route"*.

**Flyyer Render** instead requires you to explicitly declare template and variables for the images to render, **giving you more control for customization**. Let's say *"FlyyerRender delivers an image using this template and these explicit variables"*.

```
$flyyer = new FlyyerRender("tenant", "deck", "template");
$flyyer->variables = [
  "title" => "Hello world!"
];

// Use this image in your  tags
$url = $flyyer->href();
// > https://cdn.flyyer.io/render/v2/tenant/deck/template.jpeg?__v=1596906866&title=Hello+world%21
```

Variables can be complex arrays and objects.

```
$flyyer->variables = [
  "items" => [
    ["text" => "Oranges", "count" => 12],
    ["text" => "Apples", "count" => 14]
  ]
];
```

**IMPORTANT: variables must be serializable.**

To decode the URL for debugging purposes:

```
print(urldecode($url));
// > https://cdn.flyyer.io/render/v2/tenant/deck/template.jpeg?title=Hello+world!&__v=123
```

Development
-----------

[](#development)

Prepare the local environment:

```
composer install
```

Test
----

[](#test)

Run PHPUnit with:

```
composer dump-autoload
composer test
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.5% 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.

###  Release Activity

Cadence

Every ~47 days

Total

10

Last Release

1668d ago

Major Versions

0.1.6 → 1.0.02021-04-21

1.0.0 → 2.0.02021-07-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/fcdf5824b0efbfbf50779ccbe7a15123a9da88cd71325b633d793ec19deccd9b?d=identicon)[lopezjurip](/maintainers/lopezjurip)

---

Top Contributors

[![fnmendez](https://avatars.githubusercontent.com/u/20799436?v=4)](https://github.com/fnmendez "fnmendez (25 commits)")[![lopezjurip](https://avatars.githubusercontent.com/u/7570744?v=4)](https://github.com/lopezjurip "lopezjurip (9 commits)")

---

Tags

flyyerimage-generatorlaravelopen-graphphpseotwitter-cardsqsflyyer-phpflyyer

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[opentok/opentok

OpenTok is a platform for creating real time streaming video applications, created by TokBox.

1413.0M10](/packages/opentok-opentok)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[contao/image

Contao image library

131.7M9](/packages/contao-image)[intervention/image-driver-vips

libvips driver for Intervention Image

4495.5k6](/packages/intervention-image-driver-vips)[daun/statamic-mux

Seamless video encoding and streaming using Mux on Statamic sites

132.3k](/packages/daun-statamic-mux)

PHPackages © 2026

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