Hi
When I upload images to my website I always save them for the web , by compressing the image and make progressive using Photoshop.
When I run tests on my website, pagespeed is picking up that the thumbnails generated for the theme are neither progressive or compressed!
Any way I can automatically set these from the script that is run when images added to the website?
Hi,
this is what we do on our sites, in the functions.php file .. this overrides the default quality setting and is a WordPress function, not a hack. We have our set to “50” — for a portfolio site or photography site, you might choose “60” (it’s not a “percentage” of compression but a quality factor).
—-from my old post in the pagespeed thread–
For example, you could set the compression of images to something like 60% or even 50% in your child theme functions.php … will only change level on new images uploaded unless you use the regenerate thumbnails plugin or similar.
add_filter( 'jpeg_quality', create_function( '', 'return 50;' ) );
NOTE: Download your existing image files via FTP for safety backup, before you apply this with “regenerate thumbnails” as it will overwrite old files with the lower quality optimized images.
This will compress the image files but not make them progressive, which is what I was looking for.
So I have decided to do it manually, just upload the original image, then download the created thumbs via sFTP, save for web using Photoshop, with Progressive and Compression at 50.
It only takes a few more minutes when I upload the articles to my website, so not too much of an issue.
Getting excellent results from webpagetest.org.
http://www.webpagetest.org/result/140711_J0_N2Y/
and GTmetrix and pingdom etc
But cheers for the suggestion
Hm. Weird. On our server it optimizes them for progressive if we upload them that way.
OH: wait, I think our mod_pagespeed is rewriting them to progressive if not already, which is why we haven’t gotten that error you’re getting (doh).
Some people seem to like this WP plugin for optimization:
EWWW Image Optimizer — automatically makes progressive unless smaller file size from non-progressive.
SmushIt — also super popular. Now that WPMU has taken it over, it should still be viable option. We used this for a bit prior to changing the functions.php for compression level and installing mod_pagespeed in January with the rewrite images functions.