I've used the module with PNG and JPEG optimizers, but they do not apply to GIF files.
So is it an option to include one more tab in the bottom that will group tools for optimizing GIfs like:
- http://www.lcdf.org/gifsicle/ - one that I found after a fast google search.
- Others.

As far as I know we should just implement a plugin for each of the processors, so it should not be that huge of a task.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ndobromirov created an issue. See original summary.

tamnv’s picture

Hi @ndobromirov,

JPG is a lossy compression. This means that you can use "quality parameter" to adjust size / quality ratio. GIF is a lossless compression, you cannot get better compression by adjusting quality. You can read more on php.net:
http://php.net/manual/en/function.imagepng.php
http://php.net/manual/en/function.imagejpeg.php
http://php.net/manual/en/function.imagegif.php

ndobromirov’s picture

Hi,

I think you are misunderstanding the issue scope and this module's purpose.
Whenever the user uploads an image this module will try to improve it through a pre-defined list of processor tools.
All of them are not PHP based. Check the module's code for an example list and do a fast google search on it.

This issue is a feature request that will allow you to apply GIF optimizer tools, when the users are uploading them on the system.
I found 1 such tool stated in the description, but due to current work loads I am not able to implement the plugin wrappers for it and experiment.

This has nothing to do in relation to lossy/non-lossy formats, as even if PNGs are loose-less format (image files container), you can apply lossy compression on the image data through pngquat for example and still compress it more than the initial size. Usually compression with 10-20% quality loss results in 60-70% size reduction on PNGs.

BR,
Nikolay Dobromirov.

Steven Jones’s picture

Status: Active » Postponed (maintainer needs more info)

I'd welcome patches that implemented gif optimizers.

SylvainM’s picture

Status: Postponed (maintainer needs more info) » Needs review
FileSize
0 bytes

Please test this processor

SylvainM’s picture

SylvainM’s picture

Steven Jones’s picture

Project: Image Optimize » Image Optimize Binaries
Version: 8.x-2.x-dev »
SylvainM’s picture

Here is a new patch for this new module

SylvainM’s picture

vistree’s picture

Hi, @SylvainM, should your patch form #12 still work? Do you expect animitad GIFs to be still animated after the precessor has been applied?

SylvainM’s picture

> should your patch form #12 still work?
Yes, it works

> Do you expect animitad GIFs to be still animated after the precessor has been applied?
Yes

vistree’s picture

Hi sylvainM,
Thanx for your reply. Gifs are not animated on my environment. I use standard gd2 being set to 100% in image toolkit. Should this work or do I have to change e.g. to imagemagick to make your processor work?

SylvainM’s picture

GD2 can't keep animation in gif, you have to use imagemagick for your image styles

vistree’s picture

Thanx @SylvainM. I will try out!!

vistree’s picture

Maybe stupid question, but if I use ImageMagick - why do I need image optimize binrary?

SylvainM’s picture

I think Image Magick can't do all those optimizations