crowell / modpagespeed_tmp

Automatically exported from code.google.com/p/modpagespeed
Apache License 2.0
0 stars 0 forks source link

recompression of inlined images #590

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I've prepared a small test: http://itrans.pl/lury/test.html
there, you have an image, used as a image src, and also as a background in css.

MPS did not run optimization on this image.
While i ran smushit on it, it saved over 21% of image size (6.3KB).

It's often the case, that web dev don't run image optimization before 
base64-decoding it so this could be a nice feature.

Original issue reported on code.google.com by l...@critical.pl on 11 Dec 2012 at 10:24

Attachments:

GoogleCodeExporter commented 9 years ago
Please try
   ModPagespeedImageRecompressionQuality 85

See 
https://developers.google.com/speed/docs/mod_pagespeed/filter-image-optimize 
for more details.

Original comment by jmara...@google.com on 11 Dec 2012 at 10:30

GoogleCodeExporter commented 9 years ago
I've tried with compression set to 85 - no change.
I've tested also with ModPagespeedImageRecompressionQuality 50 and still, no 
change.

I've added google plus logo as a second image, since first image is pretty big 
and easily surpasses 2k inline filters limit - i thought this could block it.
But for g+ its the same - no changem and smushit.com saves 16bytes (1.73% 
savings).

Original comment by l...@critical.pl on 11 Dec 2012 at 11:33

GoogleCodeExporter commented 9 years ago
Ah, I see, you have an image that's *already* been inlined as a data: url, and 
you would like mod_pagespeed to re-optimize that image.  We used to do this, 
but stopped doing so as we ran into bugs when the optimized image was larger 
than our inlining limit!

We should be able to do this, hopefully without the bugs this time around, but 
it's not a big priority for us at the moment.  If other folks would like to see 
this working, give a shout, as we've mostly been ignoring this due to greater 
demand for us to do other things.

Original comment by jmaes...@google.com on 29 Jan 2013 at 4:15