Welcome to Centmin Mod Community
Register Now

WebPerf Optimizing Image Sizes for faster page load times with optimise-images.sh

Discussion in 'Web Development & Web Performance' started by eva2000, Apr 29, 2017.

  1. eva2000

    eva2000 Administrator Staff Member

    40,634
    9,023
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,891
    Local Time:
    5:20 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    You're welcome. Ah yes case insensitive matches ! Thanks
     
  2. fabianski

    fabianski Member

    94
    9
    8
    Feb 20, 2019
    Brazil
    Ratings:
    +28
    Local Time:
    4:20 PM
    Is single image optimization not supported?

    I'm using the plugin shor0814/image-optimiser-plugin to optimize the new images that are sent in wordpress.

    The plugin tries to do automatic optimization using the direct path to the image but this apparently does not work

    Code:
    $scriptlocation = "/usr/sbin";
    $scriptname = "optimise-images-plugin.sh";
    ...
    
    $outname = $scriptlocation.$scriptname." optimise ".$file;
    ....
    I did a test to optimize a single image directly by ssh did not work either

    Code:
    /usr/sbin/optimise-images.sh optimise /home/nginx/domains/domain.org/public/wp-content/uploads/2019/06//image.jpg
    No results are reported when I ran this command...
     
  3. eva2000

    eva2000 Administrator Staff Member

    40,634
    9,023
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,891
    Local Time:
    5:20 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    wrong thread then, you're using a fork of my optimise-images.sh created by @ShawnH so best to ask in Wordpress - Optimise Images modification and plugin

    but for my optimise-image.sh yes single image isn't supported only directory level
     
    style="display:inline-block;min-width:400px;max-width:970px;width:95%;height:90px" data-ad-client="ca-pub-6669518204467592" data-ad-slot="4024536743" data-ad-format="auto">
  4. fabianski

    fabianski Member

    94
    9
    8
    Feb 20, 2019
    Brazil
    Ratings:
    +28
    Local Time:
    4:20 PM
  5. elargento

    elargento Member

    339
    17
    18
    Jan 4, 2016
    Ratings:
    +42
    Local Time:
    4:20 PM
    10
    Why mkdir -p /home/nginx/domains/domain.com/public/images is needed? is it a temporary folder?
     
  6. eva2000

    eva2000 Administrator Staff Member

    40,634
    9,023
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,891
    Local Time:
    5:20 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    where's this comming from ?
     
  7. elargento

    elargento Member

    339
    17
    18
    Jan 4, 2016
    Ratings:
    +42
    Local Time:
    4:20 PM
    10
    upload_2019-7-3_1-0-26.png
    I don't understand if this folder is used for temporary files or if the up

    I mean, how can I optimize the images on several subfolders by overwriting the old ones with the new optimized images?
     
  8. eva2000

    eva2000 Administrator Staff Member

    40,634
    9,023
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,891
    Local Time:
    5:20 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
    that's an example, meaning I created that directory to test images in that directory for my example

    see instructions at Unattended Subdirectory Runs
     
    • Like Like x 1
  9. Mak Adang

    Mak Adang Member

    53
    17
    8
    Jan 4, 2015
    Ratings:
    +19
    Local Time:
    2:20 AM
    1.9.0
    10.0.18-MariaDB
    • Like Like x 1
  10. eva2000

    eva2000 Administrator Staff Member

    40,634
    9,023
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +13,891
    Local Time:
    5:20 AM
    Nginx 1.15.x
    MariaDB 5.5/10.x
  11. elargento

    elargento Member

    339
    17
    18
    Jan 4, 2016
    Ratings:
    +42
    Local Time:
    4:20 PM
    10
    Eva, what does ./optimise-images.sh {install} do?