Skip to content
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.

Getting started

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="">

📚 Documentation

🏗️ Foundation

  • Configuration: options of imagony.thumbnails, defaults, how configs are merged and the Symfony services of the bundle.

🖼️ Images

  • Thumbnails: Thumbnail class and the Twig function thumbnail(), templates, file naming, clean() and generate().
  • Resizing: ResizeFlag enum and Resizer.
  • Converters: Format enum, WebpConverter and AvifConverter.
  • Placeholder: built-in fallback image served by PlaceholderListener.
  • OpenGraph: OpenGraph\Image for 1.91:1 social images.

🔍 Diagnostics

  • Diagnostics: Environment, DriverInfo, ImagineFactory, Picture and the exceptions.
  • Commands: console commands imagony:check and imagony:clean.

🧫 Development

  • Development: how to develop this project and run tests.

Clone this wiki locally