Reputation: 554
I'm trying to use liip outside of a twig to convert several images (100+) to a smaller size in a cron job. I can't seem to find any documentation on it. Does anyone have any experience with this?
Upvotes: 1
Views: 278
Reputation: 39390
The LiipImagineBundle integrates the standalone PHP "Imagine library".
This library is already included in your project as dependency of the liipImageBundle so you can use standalone as example:
$imagine = new Imagine\Imagick\Imagine();
$imagine->open('/path/to/image.jpg')
->save('/path/to/image.jpg', array('jpeg_quality' => 50)) // from 0 to 100
->save('/path/to/image.png', array('png_compression_level' => 9)); // from 0 to 9
Read here for the docs and more example.
Upvotes: 1