Welcome to Centmin Mod Community
Become a Member

WebPerf optimise-images.sh IMAGICK_WEBPLOSSLESS

Discussion in 'Web Development & Web Performance' started by adamus007p, Mar 31, 2020.

  1. eva2000

    eva2000 Administrator Staff Member

    55,805
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    4:28 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    test and see if it works


    if you used same install instructions at centminmod/optimise-images of
    Code (Text):
    mkdir -p /root/tools
    cd /root/tools
    git clone --depth=1 https://github.com/centminmod/optimise-images
    

    then update would just be
    Code (Text):
    cd /root/tools/optimise-images
    git stash
    git pull
    

    git stash will wipe any customisations in your optimise-images.sh so you'd have to re-adjust them to your liking for now.

    I will update optimise-images.sh in future to allow optimise-images.ini settings file to override optimise-images.sh settings so that git stash wiping your changes won't affect custom settings.
    webP won't work for Cloudflare at least not sure on Cloudfront but optimised png and jpg will work for them
     
  2. eva2000

    eva2000 Administrator Staff Member

    55,805
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    4:28 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Just added optimise-images.ini support in latest optimise-images.sh update at centminmod/optimise-images
     
  3. adamus007p

    adamus007p Member

    371
    18
    18
    Feb 8, 2019
    Ratings:
    +36
    Local Time:
    8:28 PM
    I will test and update here.



    optimise-images.ini > that's great.

    Thank you for advise and help.
     
  4. adamus007p

    adamus007p Member

    371
    18
    18
    Feb 8, 2019
    Ratings:
    +36
    Local Time:
    8:28 PM
    Hello @eva2000

    What I can notice that now the site from 1,1MB is about 900KB.

    What is more interesting the speed of the website load is little bit slower.

    I am wondering why.

    I am thinking if here the problem is mixed images, that some are jpg/png and some are webp.

    What do you think?

    Have you make a similar tests?

    Is it possible to force the optimise-images.sh to do not delete bigger webp files?
    Now the script check the size. Is it possible to force it and every time generate a webP.

    I would like to make such test.
     
  5. adamus007p

    adamus007p Member

    371
    18
    18
    Feb 8, 2019
    Ratings:
    +36
    Local Time:
    8:28 PM
    I make test using

    Pingdom Tools
    webp smaller website 1,1MB to 900KB but slower speed test.
    1.03 s to 1.14 s

    This is small differences but it is interesting why.

    Maybe it make no sense, just for curiosity.



    Is it possible to list what was not converted to webP, check it and force to convert it to webP.

    Sometimes it could be bytes when it is not converted.
     
    Last edited: Apr 9, 2020
  6. eva2000

    eva2000 Administrator Staff Member

    55,805
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    4:28 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  7. adamus007p

    adamus007p Member

    371
    18
    18
    Feb 8, 2019
    Ratings:
    +36
    Local Time:
    8:28 PM
    Thank you for sharing. Interesting post.

    Is it possible to list what was not converted to webP, check it and force to convert it to webP?

    or list which images are not converted and diff of the size.

    Sometimes it could be bytes when it is not converted.
     
  8. eva2000

    eva2000 Administrator Staff Member

    55,805
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    4:28 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    optimise-images.sh optimise runs have verbose output so lists all details. Example at WebPerf - optimise-images.sh IMAGICK_WEBPLOSSLESS

    webP was 2203840 versus original JPG at 2100858

    no point in converting to webP is the file size is larger than original image
     
  9. eva2000

    eva2000 Administrator Staff Member

    55,805
    12,272
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,858
    Local Time:
    4:28 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Guess useful to have so added optimise routine logging so you can inspect the optimise logs for webp logic line see add optimise mode logging ยท centminmod/optimise-images@2b9e03e

    Code (Text):
    grep 'webp logic' /home/optimise-logs/optimise-log-100420-003554.log
    [webp logic]: dslr_nikon_d7200_1.jpg.webp size smaller than original 192268 < 10806424
    [webp logic]: webp-study-source-firebreathing.png.webp size smaller than original 78652 < 1206455
    [webp logic]: png24-interlaced-image1.png.webp size smaller than original 29324 < 456949
    [webp logic]: dslr_nikon_d7200_2.jpg.webp size smaller than original 231510 < 3899287
    [webp logic]: dslr_canon_eos_m6_1.jpg.webp size smaller than original 66220 < 207430
    [webp logic]: png24-image1.png.webp size smaller than original 29324 < 400998
    [webp logic]: samsung_s7_mobile_1.jpg.webp size smaller than original 78396 < 2100858
    [webp logic]: bees.png.webp size smaller than original 11226 < 177424
    


    edit: see readme's logging section for more details centminmod/optimise-images
     
    Last edited: Apr 10, 2020