Download the PHP package maximal/yii2-avif-thumbnailer without Composer
On this page you can find all versions of the php package maximal/yii2-avif-thumbnailer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package yii2-avif-thumbnailer
Yii2 thumbnailer with AVIF support
This is a Yii2 helper over the PHP AVIF thumbnailer which allows you to generate and cache image AVIF thumbnails in your Yii2 application on the fly.
Installation
Install this library with Composer:
or add
to the require
section of your app’s composer.json
file.
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:
Check the command:
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: https://avif.io/blog/
Generating thumbnails
Use this thumbnailer in your Yii2 application:
More options (outbound
instead of default inset
; alt
and class
attribute added):
Custom ffmpeg
command:
The helper’s picture()
method uses modern <picture>
HTML tag as follows:
Here you have image/avif
source for
browsers which support AVIF images
and traditional (PNG, JPEG, TIFF, GIF) image fallback.
Author
- Websites: https://maximals.ru and https://sijeko.ru
- StackOverflow story: http://stackoverflow.com/users/story/1021887
- Twitter: https://twitter.com/almaximal
- Telegram: https://t.me/maximal
All versions of yii2-avif-thumbnailer with dependencies
maximal/php-avif-thumbnailer Version ^1.0
yiisoft/yii2-imagine Version ^2.3