Optimize your images with Google's Guetzli compression algorithm

Martin Brinkmann
Mar 25, 2017
Updated • Jan 4, 2018
Development, Misc

The following guide walks you through the steps of optimizing jpeg images using Google's new Guetzli compression algorithm.

Google unveiled Guetzli some time ago, a JPEG encoder that promises up to 35% smaller file sizes than achievable with current methods.

A 35% reduction would result in Ghacks saving hundreds of Megabytes of storage space, and a lot of bandwidth thanks to optimization. Google promises that Guetzli optimized images don't sacrifice quality for size.

One example: you have 1000 jpg images on your website. Each image has a size of 100 Kiloybte. If Guetzli manages to decrease the file size by 25%, you'd reduce the size of the images by 25,000 Kilobyte, or 25 Megabytes.

If these images get downloaded 10,000 times per month, you'd save 250,000 Kilobyte, or 250 Megabyte of traffic. Also, downloads would be faster on the user side of things.

Optimize your images with Google's Guetzli compression algorithm

running guetzli file optimizer

While you can head over to GitHub to grab your own personal version of the algorithm, and build it from source on Windows, POSIX or Mac OS X, it is probably not something that most webmasters are familiar enough with.

FileOptimizer is one of the programs that ships with Guetzli support already. The program is a universal file optimizer that you can download from the software's SourceForge page.

The program is simple. Drag and drop images, or other files, to the interface, select Optimize > Optimize All Files from the menu, and wait until the process completes.

You can drop folders on the interface, to have all files that FileOptimizer supports added to the queue automatically.

Guetzli is not one of the decoders that is used by default as it is not lossless. To enable Guetzli support in FileOptimizer, do the following:

  1. Open the fileoptimizer.ini file. You find it in the main user folder, e.g. C:\users\martin\fileoptimizer.ini
  2. Locate the parameter JPEGAllowLossy, and set it to true. This is done by replacing false in the line with true, so that the beginning of the line reads JPEGAllowLossy=true
  3. Restart FileOptimizer if it is running already.

guetzli optimize images

Once you have made the change, Guetzli is used as one of the algorithms to reduce the file size of jpg images loaded into the program interface.

Initial runs on some old Ghacks folders resulted in a reduction of about 15-20% on average. This is not bad, especially since I could not detect any quality deterioration on the optimized images.

One downside to this is that it takes some time to run Guetzli on images. How long depends on the size of the image, but it gets slow when the image hits 100 Kilobyte, and really slow (a minute or more) if it is crosses the 1 Megabyte limit. Still, it is probably worth it for webmasters. Best probably if you have a spare PC, or can keep your PC on over night to run the compression jobs then.

Now You: Do you optimize your images?

Optimize your images with Google's Guetzli compression algorithm
Article Name
Optimize your images with Google's Guetzli compression algorithm
The following guide walks you through the steps of optimizing jpeg images using Google's new Guetzli compression algorithm.
Ghacks Technology News

Tutorials & Tips

Previous Post: «
Next Post: «


  1. David Brumwell said on November 18, 2017 at 2:12 pm

    Was running Guetzli on the server side to see if we could use that for image compressing but it is extremely slow. I am the developer behind the image compression tool https://imageresize.org/compress-images. It usually can save up to 80% on image size in 1/10 of the time it takes to run them through Guetzli.

  2. Guti said on September 16, 2017 at 8:19 am

    Since the release of FileOptimizer 11, there is no need to manually edit ini files anymore:

  3. Atellani said on June 21, 2017 at 5:40 pm

    Guetzli can be used online and for free thanks to http://www.ishrinker.com

  4. chesscanoe said on April 10, 2017 at 1:52 pm

    I’m amazed at the results of http://www.guetzli.it and it is free to use while in its current beta. I gave it a 1920×1080 compressed PNG at 100% quality with 328886 colors and a disk size of 2.39 MB. After a minute or two, guetzli returned a 95% quality JPG with 148424 colors and a disk size of 657.93 KB. Quoted numbers from IrfanView Information. The new image looked very good to the eye.

    1. mauryr said on April 11, 2017 at 5:29 am

      Thank you for your kind words!
      We hope our service can help getting Guetzli adopted mainstream. We believe optimized images are much more important than people give them credit for, be the optimizations done with Guetzli or other algorithms.
      Please kindly help spreading the word!

      1. mauryr said on April 11, 2017 at 12:44 pm

        We can certainly look into it! Our solution can be useful for websites and desktop tools both

      2. chesscanoe said on April 11, 2017 at 10:19 am

        Would it be practical to provide a Guetzli plugin for IrfanView x32 & x64, or would this interfere with your future plans?

  5. mauryr said on April 10, 2017 at 11:56 am

    The first cloud service leveraging Guetzli is live on:

    Try it out and see for yourself!

  6. Phil said on April 4, 2017 at 2:23 pm

    The file fileoptimizer.ini isn’t in the folder location described above. I looked in all of my C: drive and there isn’t one… All I found was the guetzli.exe file in the Plugins64 folder (Program Files)? Was the file eliminated or something?

    1. Martin Brinkmann said on April 4, 2017 at 2:29 pm

      I found it in the user’s root folder, C:\Users\Martin. Don’t think it was removed from there.

  7. Anonymous said on March 28, 2017 at 6:44 am

    Yes, in France Google also knows how to compress its taxes, the encoder is called “Paradis Fiscal”.

  8. All Things Firefox said on March 26, 2017 at 8:01 pm

    How does Guetzli compare to Riot in image quality and size?

    1. Martin Brinkmann said on March 26, 2017 at 8:27 pm

      I have not run Riot in a long while, so cannot really say. I’d assume that Guetzli manages to drop the size more than Riot does. Quality-wise, I have no idea.

  9. chesscanoe said on March 26, 2017 at 4:48 pm

    I’m all in favor of taking a *.jpg photo at the maximum resolution of the camera, and then tilting and cropping the image to make it better. Resizing it to the desired screen size and saving it as a *.png or *.jpg using IrfanView plugins allows you the best quality, ease of use, and size compromise for the purpose at hand.

  10. sinju said on March 26, 2017 at 4:47 pm

    I am using photoshop, how can i compress the jpeg using guetzli. And i have no idea about the guetzli. and what is guetzli (is this is a software or what and where i can download it) pls help

    1. Joe said on March 29, 2017 at 2:07 pm

      The article gives you full details about what the Guetzli encoder is and instructions on how to use it — using FileOptimizer. There will probably be a Photoshop plugin eventually, but as the tool is very new, FileOptimizer is currently your easiest option. The article is clearly written and can be translated into your language.

  11. George P. Burdell said on March 26, 2017 at 3:19 pm

    My complaint about image compression is that it is not used often enough.

    Millions of people routinely ignore their camera settings menus. Among my circle of friends and relatives, few to none have considered the planet-wide damage done by failing to appropriately adjust the pixel count settings on their digital cameras and/or picture-taking phones. As a direct result of this intellectual laziness, the sharing of family or vacation scenery snapshots via email is fatally flawed by the proliferation of megabyte-plus sized image files.

    A perfectly adequate computer screen image can be viewed at 640×480 pixels, corresponding to a file size of 50 to 80 KB. A file this size is easy to transmit and store, without concern about overburdening transmission bandwidth, and without hogging recipient disk capacity. Why, then, do people shoot and share pictures of their darling children or cats/dogs or distant hills at 6 to 10 megapixels? Do they imagine I will put these images on an advertising billboard by the roadside? Am I expected to zoom in to admire the striations in the pupils of their girlfriend’s eyeballs? T.M.I.!

    When I receive an email from a friend, I feel socially obliged to see what they want to show me, but it is a painful process when a cute puppy-dog photo file attachment comes in at 2 megabytes. What’s the point of providing enough detail to allow a recipient to zoom in and count individual hairs?

    My personal digital camera/phone settings have all been adjusted to shoot at 640×480 in the first place, so no further reduction is needed. If I need to capture a more detailed image for a particular purpose, I just change the capture size before shooting, then put it back to my normal setting immediately afterwards. The downside of this strategy is that I cannot later examine more detail in an image, not having captured it in the first place. The upside is that even a modestly sized camera memory chip can hold tens of thousands of pictures.

    Windows users, at least, already have an adequate utility program that can whack a bloated JPG file down to size. It’s called “Paint”. Open your picture file, click on “Resize” then select “Pixels” and type the number 500 or so into the box labeled “Horizontal”. Save a renamed copy of your file, and email that instead of your bloated original. Quick, easy, and recipient-friendly!

    1. John said on March 26, 2017 at 7:13 pm

      Don’t really agree. Those low quality pictures are worthless for any use later in any process. Friends of mine do photography for a hobby/living and they want higher resolution as soon as its available. That the picture later is cropped, resized, edited for whatever need its going to, is a given, but at least that is then possible.
      By making “default” a very low resolution picture, you take away any possibility in post processing.

      Unless you actually use one of those 25 year old CRT monitors in 640×480 resolution, its going to look bad anywhere. Not even worth the effort of taking a picture.

    2. Tom Hawack said on March 26, 2017 at 4:23 pm

      I do agree. A high-resolution image may be required/wished but should be decided accordingly and not as default. Speaking of default personally I consider 640×480 px as short when I’d rather choose a minimum of 1024×768

      For whom may be interested in dramatically reducing images already on board, say to send many heavy ones, there is an application I’ve been using for some time, dated 2010 but still worth it IMO, available from the developer’s site:

      FILEminimizer Picture – http://www.balesio.com/fileminimizerpictures/eng/index.php

      The application offers several compression levels, it’s quite well done. If extra fine image tuning is not required, I’ve seen some of my jpeg files (generally 100% or 90% quality) shrink to 10% of their original size : just imagine the ratio from a bmp file …

  12. YourName said on March 26, 2017 at 1:50 pm

    it’s an encoding algorithm not a compression algorithm.

    1. Tom Hawack said on March 26, 2017 at 2:30 pm

      “Guetzli is a JPEG encoder that aims for excellent compression density at high visual quality.” dixit https://github.com/google/guetzli/

      Obviously it compresses, forget the rhetoric, be a PhD not a graduate, please, mercy!

  13. Tom Hawack said on March 26, 2017 at 12:19 pm

    Good morning, good evening :)

    I am wondering,

    1- Does the Guetzli algorithm include several levels of compression?
    2- What jpeg compression level is the Guetzli rendering size compared to? Jpeg-100%, Jpeg-90% … ?

    At one point Guetzli and Jpeg must have an equal size. Would that be with Jpeg at, say, 80%? At such a similar size, is the Guetzli rendering better?

    That’s all :)

  14. Tony said on March 26, 2017 at 7:20 am

    If you compress images using this algorithm, can all browsers decompress the images natively?

    What about other software?

    Will standard JPG libraries be able to decompress these images without requiring updates?

    1. Martin Brinkmann said on March 26, 2017 at 7:46 am

      Tony, yes images compressed with Guetzli display just fine like before.

  15. MdN said on March 26, 2017 at 6:13 am

    If the images aren’t too important but I need them, like something I quickly edited in Gimp, I use “save for web”. And for the rest (stuff downloaded from internet, wallpapers etc) when I have enough I use batch processing and save them all in 85% quality. People at the Nokia camera division did some testing back in the day and concluded that no one can see the difference between 85% and higher – well, at least I can’t, and it saved me hundreds of Megabytes of disk space. I hope someone makes a program for Linux with Guetzli integrated, or adds it to one of the existing ones.

  16. RossN said on March 25, 2017 at 8:49 pm

    If I had storage issues, I’d consider storing jpegs in ‘Lepton’ format. This is completely lossless and retains EXIF data. Dropbox does this with your jpegs without you noticing. This saves about 20% or more in size.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.