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. kinhatula

    kinhatula New Member

    7
    2
    3
    Sep 6, 2017
    Ratings:
    +2
    Local Time:
    4:12 AM
    sorry, can I ask you a question? where is add this code into file domain.com.ssl.conf or domain.com.conf ?

    location /webp {
    #pagespeed off;
    autoindex on;
    add_header X-Robots-Tag "noindex, nofollow";
    location ~* ^/webp/.+\.(png|jpe?g)$ {
    expires 30d;
    add_header Vary "Accept-Encoding";
    add_header Cache-Control "public, no-transform";
    try_files $uri$webp_extension $uri =404;
    }
    }
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    7:12 AM
    Nginx 1.13.x
    MariaDB 5.5
  3. kinhatula

    kinhatula New Member

    7
    2
    3
    Sep 6, 2017
    Ratings:
    +2
    Local Time:
    4:12 AM
    thanks eva2000
     
    • Like Like x 1
  4. dcg

    dcg Premium Member Premium Member

    6
    3
    3
    Oct 17, 2015
    Florida, USA
    Ratings:
    +5
    Local Time:
    5:12 PM
    1.13.5
    10.1.28
    FYI

    Mozjpeg needs a tar zxf after source download for installing.
    Code:
    echo "installing mozjpeg"
      cd /usr/src
      wget https://github.com/mozilla/mozjpeg/releases/download/v3.2-pre/mozjpeg-3.2-release-source.tar.gz
    #need tar zxf of source to which extracts to mozjpeg
      cd mozjpeg
      ./configure
      make -s
      make -s install
      MOZJPEG_BIN='/opt/mozjpeg/bin/jpegtran'
      echo "installed mozjpeg" 
    optimise-images/optimise-images.sh at master · centminmod/optimise-images · GitHub
     
    • Informative Informative x 2
  5. eva2000

    eva2000 Administrator Staff Member

    30,168
    6,785
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,137
    Local Time:
    7:12 AM
    Nginx 1.13.x
    MariaDB 5.5
    thanks @dcg for the heads up :)
     
    • Like Like x 1