Google's Guetzli Image Optimizing Algorithm

Post here if your message doesn't fit into another forum but is still about web development. Includes site critiques, web hosting and server questions, helpful software and resources, and more.
Post Reply
User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 562
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Google's Guetzli Image Optimizing Algorithm

Post by RSteinwand » Thu Mar 23, 2017 7:41 am

https://www.extremetech.com/internet/24 ... -dont-back

If you use PageSpeed Insights, they've changed how they analyze images and pages. Page rendering is now using the Blink engine they started using in Chrome about 3 years ago and now images are compared to their Guetzli-optimized and it's not uncommon to see where your images could be better.

FWIW, I've had great success by saving jpeg images as "progressive encode" (I use Paint.net with "Optimized JPEG" plug-in. Then I upload to https://tinyjpg.com. This has worked for me for the last 6 months or more and I still get 99% on most pages, even after the recent PSI changes.

Their cmd line tool is available on GitHub, but I'm waiting for a plug-in that'll work with Paint.net. Meanwhile I'll just continue to upload my jpg and png's to tinypng.
Rick

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3236
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Google's Guetzli Image Optimizing Algorithm

Post by Albert Wiersch » Thu Mar 23, 2017 8:46 am

Thanks. That was an interesting piece. Looks like that algorithm needs more work from their testing.

Anyway, I always get the impression (when I'm browsing on my mobile phone which I generally try to avoid) that bloat and a poor experience is much more often caused by all the junk and scripts that pages load and run, and not by image file size.

Also, since you mentioned https://tinyjpg.com/ , I want to mention https://tinypng.com/ , which is what I use... wait! I just realized they seem to be the same site. :) Maybe they started with PNG files and then expanded to JPGs. In any case, they provide a valuable service.
Image
Albert Wiersch

User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 562
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Google's Guetzli Image Optimizing Algorithm

Post by RSteinwand » Thu Mar 23, 2017 9:38 am

I wonder where I got the idea to use Tinypng? :roll:

I think Google found out that sites like Tiny and JpegMini were reducing the number of colors (which decreases file size) with good success and decided to "roll their own" to create a standard.

I agree with stupid website developers. Turn on every script error in IE 11 (which I use for development), then try browsing the web and see how far you get. Lots of script errors out there.
Rick

User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 562
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Google's Guetzli Image Optimizing Algorithm

Post by RSteinwand » Fri Mar 24, 2017 10:50 am

ImageOptim now support Guetzli, but check out the comment about how slow it is.

https://imageoptim.com/changelog.html#v1.7.1
  • It's off by default (enable in Preferences), because it's very slow: 1 minute + 300MB RAM per megapixel. It is normal for a large photo to take 30 minutes and gigabytes of memory.
  • It's ineffective on JPEGs with quality 85 or lower. It's best to create JPEGs with 100% quality for running Guetzli on them.
    Guetzli does not support color profiles, so only use sRGB.
  • Running Guetzli on the same image twice is not recommended, as it will decrease quality more than it reduces the file size. If you need smaller files, disable Guetzli, and enable Lossy mode instead.
Directions for using Guetzli on Github are equally depressing, esp. for pngs that use transparency: https://github.com/google/guetzli/blob/master/README.md
  • Note: Guetzli uses a large amount of memory. You should provide 300MB of memory per 1MPix of the input image.
  • Note: Guetzli uses a significant amount of CPU time. You should count on using about 1 minute of CPU per 1 MPix of input image.
  • Note: Guetzli assumes that input is in sRGB profile with a gamma of 2.2. Guetzli will ignore any color-profile metadata in the image.
  • Note that Guetzli is designed to work on high quality images. You should always prefer providing uncompressed input images (e.g. that haven't been already compressed with any JPEG encoders, including Guetzli). While it will work on other images too, results will be poorer.
  • Please note that JPEG images do not support alpha channel (transparency). If the input is a PNG with an alpha channel, it will be overlaid on black background before encoding.
Rick

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3236
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: Google's Guetzli Image Optimizing Algorithm

Post by Albert Wiersch » Fri Mar 24, 2017 12:08 pm

Wow... I had no idea it was that slow and used that much memory... also very important seems to be the requirement to provide high quality images, to make sure all that processing time is worth the wait.

Thanks for posting those useful comments and info about Guetzli.
Image
Albert Wiersch

User avatar
RSteinwand
Rank VI - Professional
Rank VI - Professional
Posts: 562
Joined: Mon Jun 09, 2008 2:12 pm
Location: Fargo, ND
Contact:

Re: Google's Guetzli Image Optimizing Algorithm

Post by RSteinwand » Fri Mar 24, 2017 2:06 pm

I was all over it and checking for a Paint.net plug-in, even considering creating a login for Paint.net's forum to request the plug-in.

Now, not so much.
Rick

Post Reply