LiipRokkaImagineBundle
, (*1)
Overview
When using Rokka.io together with Symfony we recommend to use the Rokka client bundle, but this bundle serves as a stepping stone and provides you with ability to use Rokka.io service as a driver to LiipImagineBundle, (*2)
It takes your existing imagine configuration and generates Rokka stacks for you with the same name as the imagine filter set. It then uses the stacks from Rokka on the fly, so that you don't have to change anything in your code. It's nearly a drop-in replacement., (*3)
NOTE: While we do testing for the conversion from LiipImagineBundle configuration to rokka stacks, there might still be visual differences, or bugs in the conversion. Please sanity check the generated stacks before switching a production website., (*4)
Installation
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:, (*5)
$ composer require liip/rokka-imagine-bundle
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation., (*6)
Step 2: Enable the Bundle
Then, enable the bundle:, (*7)
// config/bundles.php
return [
...
Liip\RokkaImagineBundle\LiipRokkaImagineBundle::class => ['all' => true],
];
Add following parameters to your parameters file:, (*8)
liip_rokka_imagine.rokka.organization: 'your_rokka_organization'
liip_rokka_imagine.rokka.api_key: 'your_rokka_api_key'
liip_rokka_imagine.images_dir: '/path/to/the/images/dir/'
Execute following command in order to export your defined filter and filter sets from LiipImagineBundle configuration to Rokka.io:, (*9)
$ bin/console liip:rokka-imagine:config:sync
To ouptut your images through rokka, adjust the LiipImagineBundle configuration to use rokka
as cache:, (*10)
# config/packages/imagine.yaml
liip_imagine:
cache: rokka