Thursday, November 27, 2014

compress jpeg image with mozjpeg

unlike webp, mozjpeg is comply with jpeg format. it can reduce jpeg image without reducing quality or compatibility

1- download and intstall
user1@mozjpeg:/$ wget https://github.com/mozilla/mozjpeg/archive/master.zip
user1@mozjpeg:/$ cd mozjpeg-master
user1@mozjpeg:/$ ./configure
user1@mozjpeg:/$ make

2- using and comparision

user1@mozjpeg:/$ ./cjpeg  image.jpeg > image-compress.jpeg
user1@mozjpeg:/$ du -h image*
908K    image-compress.jpeg
7.9M    image.jpeg


we can save nearly 90% storage or bandwidth using mozjpeg ^




No comments:

Post a Comment