dev-master
9999999-devA Package with binaries to use image optimizers with Liip image
GNU GPLv3
The Requires
1.0
1.0.0.0A Package with binaries to use image optimizers with Liip image
GNU GPLv3
The Requires
A Package with binaries to use image optimizers with Liip image
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:, (*1)
$ composer require wearejust/image-optim-bundle "~1"
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation., (*2)
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php
file of your project:, (*3)
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Wearejust\ImageOptimBundle\WearejustImageOptimBundle(), ); // ... } // ... }
config.yml
fileIt's possible to override the config we provide, you can specify an custom yml file (as Resources/config/theme.yml)
the following way:, (*4)
parameters: liip_imagine.jpegoptim.binary: '%kernel.root_dir%/../src/Wearejust/ImageOptimBundle/Resources/bin/jpegoptim' liip_imagine.optipng.binary: '%kernel.root_dir%/../src/Wearejust/ImageOptimBundle/Resources/bin/optipng-x64' liip_imagine.pngquant.binary: '%kernel.root_dir%/../src/Wearejust/ImageOptimBundle/Resources/bin/pngquant-x64' post_processes: jpegoptim: { strip_all: true, max: 70, progressive: true } optipng: { strip_all: true, level: 5 }
After adding this you will be able to use the post_processes
variable in the defined filter presets. An example for this:, (*5)
liip_imagine : filter_sets : cache : ~ home_hero_image: quality: 100 filters: thumbnail: crop: { start: [0, 0], size: [1100, 1100] } position: center post_processors: '%post_processes%'
A Package with binaries to use image optimizers with Liip image
GNU GPLv3
A Package with binaries to use image optimizers with Liip image
GNU GPLv3