Image Optimisation


jpegoptim

Optimise the images

Install

MACbrew install jpegoptim
Ubuntuapt install jpegoptim 


Usage

Go to the directory

 jpegoptim -m80 --strip-all ../<current directory>/* 


ImageMagick

use to resize images, use in combination with compression

install

 MAC brew install imagemagick
Ubuntuapt install imagemagick   


usages

 convert <image in name> -resize '500x>' -define jpeg:extent=50KB <image out name> 


PNG Quant

https://pngquant.org/

 pngquant --quality=65-85 --speed 1 --force --verbose ../img-opti/* 


Bash usages

 #!/bin/bash  shopt -s nullglob shopt -s nocaseglob for f in *.jpg; do     convert "$f" -resize '500x>' -define jpeg:extent=50KB "$f"  done