smarter-solutions/ez-image-crop

This is a tool that improves cutting images in eZ Publish

v2.0 2016-12-21 23:27 UTC

README

This is a tool that improves cutting images in eZ Publish

Install Package

composer require smarter-solutions/ez-image-crop "~1.0"

Register Bundle

// ezpublish/EzPublishKernel.php

class EzPublishKernel extends Kernel
{
    ...
    public function registerBundles()
    {
        ...
        $bundles = array(
            ...
            new SmarterSolutions\EzComponents\EzImageCropBundle\EzImageCropBundle()
            ...
        );
        ...
    }
}

Define filters

# ezpublish/config/ezpublish.yaml

ezpublish:
    imagemagick:
        filters:
            gravity/center: '-gravity Center'
...

Create Image alias

# ezpublish/config/ezpublish.yaml

ezpublish:
    system:
        frontend:
            image_variations:
                first_alias:
                    reference: null
                    filters:
                        - { name: gravity/center, params: [200, 75] }
...