Repository navigation
Home
Jan Hermann edited this page Oct 9, 2026
·
2 revisions
🕹️
How to use package.
Symfony bundle and Twig extension for creating thumbnails of images using Imagine.
Install the package as described in the README and register the bundle in config/bundles.php:
return [
// ...
Imagony\ImagonyBundle::class => ['all' => true],
];The bundle works without a configuration file. It needs PHP extension GD or Imagick, check the installation with php bin/console imagony:check (needs symfony/console).
Use it in a Twig template:
<img src="{{ thumbnail('images/gallery/', item.image, width: 800, height: 600) }}" alt="">-
Configuration: options of
imagony.thumbnails, defaults, how configs are merged and the Symfony services of the bundle.
-
Thumbnails:
Thumbnailclass and the Twig functionthumbnail(), templates, file naming,clean()andgenerate(). -
Resizing:
ResizeFlagenum andResizer. -
Converters:
Formatenum,WebpConverterandAvifConverter. -
Placeholder: built-in fallback image served by
PlaceholderListener. -
OpenGraph:
OpenGraph\Imagefor 1.91:1 social images.
-
Diagnostics:
Environment,DriverInfo,ImagineFactory,Pictureand the exceptions. -
Commands: console commands
imagony:checkandimagony:clean.
- Development: how to develop this project and run tests.