A very simple Symfony Bundle that wraps around the Intervention Image ImageManager.
Bundle is set at Symfony 3.4 but I have not tested this as this bundle was created for personal use I have only used it in flex projects (4+), however from what I can tell the latest required feature it uses is autowiring so I moved it down.
Quoted from Intervention Image:
Intervention Image requires the following components to work correctly.
- PHP >= 5.4
- Fileinfo Extension
And one of the following image libraries.
- GD Library (>=2.0) … or …
- Imagick PHP extension (>=6.5.7)
composer require impulze/intervention-image-bundle
use Impulze\Bundle\InterventionImageBundle\ImageManager;
...
// Get service from container:
$manager = $container->get(ImageManager::class);
...
// Or use symfony autowiring
public function __construct(ImageManager $manager)
{
$image = $manager->make('public/foo.jpg')->resize(300, 200);
...
}
For all features that come with Intervention Image check their own documentation.
This bundle allows for the following configuration:
intervention_image:
driver: gd # or imagick, defaults to gd