Join the community today
Become a Member

WebPerf Zopfli Optimization: Literally Free Bandwidth

Discussion in 'Web Development & Web Performance' started by Jimmy, Jan 2, 2016.

  1. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    1:12 AM
  2. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    3:12 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yeah it's good, I use Zopfli based script to auto compress static files on H20 HTTP/2 web server before they had on the fly compression support :)

    however, for image optimisation of PNGs much easier way with irfanview which i have used for nearly 10 yrs now.

    basic optimisation true color original left vs optimised right down to 613.92KB

    upload_2016-1-2_22-39-41.png

    convert to 256 bit color pallete with best compression - down to 201.32KB

    upload_2016-1-2_22-40-56.png

    then apply PNGout on than image

    upload_2016-1-2_22-45-7.png

    end result is this image below at 135.36KB !

    PBF274-Adam_2-0-opt.png
     
    Last edited: Jan 2, 2016
  3. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    3:12 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    And if I just take the true color version 32bit and pass through PNGout alone = 561.77KB lossless image

    upload_2016-1-2_22-56-39.png

    png

    PBF274-Adam_2-0_pngout.png

    the ngx_pagespeed auto png to webp lossless version seems to end up at around 424KB (same as if i saved to webp via irfanview as lossless) but if i use Irfanview to save original as webp it ends up between 83-88KB in size depending on preset used due to maybe quality setting at 75%

    upload_2016-1-3_23-58-53.png

    upload_2016-1-4_0-0-28.png
     
    Last edited: Jan 4, 2016
  4. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    3:12 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Last edited: Jan 2, 2016
  5. Xon

    Xon Active Member

    173
    61
    28
    Nov 16, 2015
    Ratings:
    +229
    Local Time:
    1:12 PM
    1.15.x
    MariaDB 10.3.x
    I was thinking of using zopfi (or similar) to create .gz'ed files of the distributable bits for XenForo and then use nginx's gzip_static function. Most of the files don't change very often, but the on-the-fly compression could always be better.
     
  6. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    3:12 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    well Firefox 44 is coming this month and it supports brotli compression which compresses between 20-40% better than gzip deflate for text.. already testing this on this forum as I am using Centmin Mod 123.09beta01 with ngx_brotli module enabled. Original details here

    brotli > zopfli > gzip

    upload_2016-1-3_11-33-22.png
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    3:12 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    curious what discourse's avatar png images (from blog article) will end up like with ngx_pagespeed's auto webp conversion on this forum :)

    Optimize Images | PageSpeed Module | Google Developers
    discourse-default-avatar-a.png discourse-default-avatar-d.png discourse-default-avatar-s.png

    edit: doh ngx_pagespeed auto inlined them instead

    upload_2016-1-4_1-31-24.png

    but not before converting to webp it seems

    upload_2016-1-4_1-37-55.png
     
    Last edited: Jan 4, 2016
  8. eva2000

    eva2000 Administrator Staff Member

    54,857
    12,238
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,809
    Local Time:
    3:12 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+