Skip to content

Adding a compressor

Ingo Walther edited this page Oct 11, 2016 · 2 revisions

Create compressor

Create a class witch implemenets the Interface "Compressor".

Register the compressor

Define Service in "config/services.yml"

Example:

  mozJpegCompressor:
    class: IngoWalther\ImageMinifyApi\Compressor\MozJpegCompressor
    tags:
        - { name: image.compressor, alias: jpeg}