Image variety jpeg compression


(Oleg Voronin) #1

We're hosting multiple sites on our Squiz Matrix system and some of those sites have responsive designs. Part of our responsive implementation includes support for retina-friendly images; desktop users get the same images so to avoid much unnecessary overhead, a lower JPEG compression level (i.e. lower quality, smaller size) is used when generating image varieties (thumbnail, preview, hero image).

 

The problem with this approach is that compression level seems to be applied globally - any "non-responsive" site that also relies on triggers for generating image varieties inherits the "low" settings and results in visible pixelation/JPEG artifacts.

 

Is there a way to configure compression settings per trigger, or is there an altogether different approach to be taken?


(Nic Hubbard) #2

No, there isn't a way to change image compression for an image variety. I posted this as a bug in 2008 but it hasn't been fixed yet:

 

http://bugs.matrix.squiz.net/view_bug.php?bug_id=3323

 

If I had a bit more time I would write the feature myself and submit it back to Squiz, but time is $$.


(Oleg Voronin) #3

No, there isn't a way to change image compression for an image variety. I posted this as a bug in 2008 but it hasn't been fixed yet:

 

http://bugs.matrix.squiz.net/view_bug.php?bug_id=3323

 

If I had a bit more time I would write the feature myself and submit it back to Squiz, but time is $$.

 

Thanks, Nic. I wonder what work-around we'll end up with :\


(Nic Hubbard) #4

 

Thanks, Nic. I wonder what work-around we'll end up with :\

 

I don't know what your workflow is like, but personally I manually add high-res varieties, and sometimes the low-res thumbnails because I am not satisfied with the compression.


(Oleg Voronin) #5

 

I don't know what your workflow is like, but personally I manually add high-res varieties, and sometimes the low-res thumbnails because I am not satisfied with the compression.

 

Some EES users who end up uploading such images will not necessarily have the tools or... know-how? to manually create thumbnails _

 

Given the choice, I'd rather automate the process as much as possible than have artisan image compression :) I guess we could always pitch responsifying the legacy sites and use some batch compression in the meantime.


(Aleks Bochniak) #6

The 'quality' of the image jpeg resizing/creation is hard coded to '80' in /squiz_matrix/fudge/image/image_manip.inc line 235

 

Have a play with editing this file to see if quality improves.