PHPackages                             maximal/php-avif-thumbnailer - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. maximal/php-avif-thumbnailer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

maximal/php-avif-thumbnailer
============================

PHP (over Imagine) helper for creating and caching AVIF thumbnails in real time

v1.0.0(3y ago)13.9k—3.7%1MITPHPPHP ^8.0|^8.1|^8.2

Since Nov 24Pushed 3y ago1 watchersCompare

[ Source](https://github.com/maximal/php-avif-thumbnailer)[ Packagist](https://packagist.org/packages/maximal/php-avif-thumbnailer)[ RSS](/packages/maximal-php-avif-thumbnailer/feed)WikiDiscussions main Synced 1mo ago

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

PHP thumbnailer with AVIF support
=================================

[](#php-thumbnailer-with-avif-support)

`AvifThumbnailer` is a thumbnail helper which allows you to generate and cache image thumbnails in your PHP application on the fly.

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

[](#installation)

Install this library with Composer:

```
composer require "maximal/php-avif-thumbnailer"
```

or add

```
"maximal/php-avif-thumbnailer": "^1.0"

```

to the `require` section of your app’s `composer.json` file.

Checking the environment
------------------------

[](#checking-the-environment)

You will need FFMPEG with AVIF (AV1) coder installed in your system.

For instance in Ubuntu/Debian it is included in `ffmpeg` package:

```
sudo apt install ffmpeg
```

Check the command:

```
ffmpeg -version
```

You should get an output with the version number. Every version after `4.3` should be fine.

If you have installed `ffmpeg` to a different command or path, configure the static property `AvifThumbnailer::$ffmpegCommand` before using the helper (see the example below).

More info about AVIF:

Generating thumbnails
---------------------

[](#generating-thumbnails)

Use this thumbnailer in your PHP application:

```
use Maximal\Thumbnailers\AvifThumbnailer;

echo AvifThumbnailer::picture('/path/to/img/image.png', $width, $height);
```

More options (`outbound` instead of default `inset`; `alt` and `class`attribute added):

```
use Maximal\Thumbnailers\AvifThumbnailer;

echo AvifThumbnailer::picture(
	'/path/to/img/image.png',
	$width,
	$height,
	false,
	['alt' => 'Alt attribute', 'class' => 'img-responsive']
);
```

Custom `ffmpeg` command:

```
use Maximal\Thumbnailers\AvifThumbnailer;

AvifThumbnailer::$ffmpegCommand = '/usr/local/bin/ffmpeg';
echo AvifThumbnailer::picture('/path/to/img/image.jpg', $width, $height);
```

The helper’s `picture()` method uses modern `` HTML tag as follows:

```

```

Here you have `image/avif` source for [browsers which support AVIF images](https://caniuse.com/#search=AVIF)and traditional (PNG, JPEG, TIFF, GIF) image fallback.

Author
======

[](#author)

- Websites:  and
- StackOverflow story:
- Twitter:
- Telegram:

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1271d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/980679?v=4)[MaximAL](/maintainers/maximal)[@maximal](https://github.com/maximal)

---

Top Contributors

[![maximal](https://avatars.githubusercontent.com/u/980679?v=4)](https://github.com/maximal "maximal (1 commits)")

---

Tags

thumbnailhelperimageimagineavif

### Embed Badge

![Health badge](/badges/maximal-php-avif-thumbnailer/health.svg)

```
[![Health](https://phpackages.com/badges/maximal-php-avif-thumbnailer/health.svg)](https://phpackages.com/packages/maximal-php-avif-thumbnailer)
```

###  Alternatives

[yiisoft/yii2-imagine

The Imagine integration for the Yii framework

2865.4M275](/packages/yiisoft-yii2-imagine)[folklore/image

Image manipulation library for Laravel 5 based on Imagine and inspired by Croppa for easy url based manipulation

270248.2k5](/packages/folklore-image)

PHPackages © 2026

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