0

Is it possible to set quality for png images on ezpublish 2014.11 in `image_variations' config.

I'm looking for something like this :

    media:
        reference: null
        quality: 50
        filters:
            - { name: geometry/scalewidthdownonly, params: [100] }

I found ezpublish doc on alias, but it seems limited to jpeg.

I found jpegoptim liip post processor, but liip imagine doesn't seems to have an optipng post processor.

So my guess is that I'll have to build my own post processor based on the jpegoptim one.

Any simpler solution ?

sylvain
  • 1,951
  • 2
  • 19
  • 34

1 Answers1

1

These rather new liip imagine bundle setting / feature(s) are not supported 'directly' (today) in eZ Publish 5.4 (Community Build 2014.11 or latest composer / GitHub sources).

This has been discussed previously: http://share.ez.no/forums/ez-publish-5-platform/ez-5.4-image-variations-jpeg-quality

http://share.ez.no/forums/discussions/new-in-ez-5.4-image-alias-system-revamped/(order)/latest

Rumor has it that this will be addressed in the future but no specific commitments have yet been publicly made. There is an existing issue ticket for this concern: https://jira.ez.no/browse/EZP-24167

A user did find a partial work around that they shared as helpful but not quite perfect: http://share.ez.no/forums/ez-publish-5-platform/ez-5.4-image-variations-jpeg-quality/comment86157

Heath
  • 133
  • 7
  • Thanks. All options described in the links you provided seem limited to JPEG. Am I right ? I made an attempt with a custom postprocessor but hasn't managed to get it work even if there is no configuration issues detected. Do you know if the postprocessor setting should work ? – sylvain Jun 10 '15 at 06:34
  • No worries. But no your not technically 'right'. If you read all the links in my share message (re: liip imagine bundle github links) you will see this covers png quality as well, http://share.ez.no/forums/ez-publish-5-platform/ez-5.4-image-variations-jpeg-quality/comment86155 At the time of my previous message, and it took a lot of research at the time, I found this commit which introduces the 'quality' changes which include png support as well as jpg support: https://github.com/liip/LiipImagineBundle/commit/2779907540a796882884a4bba287a00347b8e74e – Heath Jun 10 '15 at 07:28
  • The new settings (which can be generic or format specific) can be found here: https://github.com/liip/LiipImagineBundle/blob/2779907540a796882884a4bba287a00347b8e74e/Resources/doc/configuration.rst Please realize as I point out in my share message link (above) that eZ Publish Kernel composer.json does -not- use the latest branch version of liip imagine bundle which provides the new 'quality' features. eZ is stuck by default at ~1.0 where as the new features require ~1.2.3 Re: https://github.com/liip/LiipImagineBundle/commits/1.0.0 Re: https://github.com/liip/LiipImagineBundle/commits/1.2.3 – Heath Jun 10 '15 at 07:33
  • ok thanks. I didn't saw the git commit about png. But if I'm not mistaken, given all those settings are not available in 2014.11 and png handling in not availabe in liip 1.0 wich is used in ezpublish 2014.11 I only have 4 options : 1) use the workaround described in http://share.ez.no/forums/ez-publish-5-platform/ez-5.4-image-variations-jpeg-quality#comment86157 and convert all my images to JPEG. 2) use the workaround and attempt a liip imagine upgrade. 3) wait for an ezpublish upgrade (which in that case will probably mean upgrading to eZ Platform. 4) continue with my post processor attempt. – sylvain Jun 10 '15 at 08:05
  • upgrading liip is your simplest (fastest) yet incomplete option in the short term. that can be done quickly with composer.json changes and running composer update. i'm not familiar with post processors to give a comment, if you upgrade i do not see why you would need such a thing for quality control. as for ezpublish-kernel solving this problem in general within eZ .. we have no basis to expect any speedy resolution to the problems from the migration from legacy to liip. – Heath Jun 10 '15 at 09:53