2017 © Pedro Peláez
 

symfony-bundle image-optim-bundle

A Package with binaries to use image optimizers with Liip image

image

wearejust/image-optim-bundle

A Package with binaries to use image optimizers with Liip image

  • Friday, September 22, 2017
  • by wearejust
  • Repository
  • 2 Watchers
  • 1 Stars
  • 696 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 5 % Grown

The README.md

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:, (*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)

Step 2: Enable the Bundle

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(),
        );

        // ...
    }

    // ...
}

Step 3: Add extra config to your config.yml file

It'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%'

The Versions

22/09 2017

dev-master

9999999-dev

A Package with binaries to use image optimizers with Liip image

  Sources   Download

GNU GPLv3

The Requires

 

20/09 2017

1.0

1.0.0.0

A Package with binaries to use image optimizers with Liip image

  Sources   Download

GNU GPLv3

The Requires