JPG and PNG compression, PHP and Ubunutu with jpegtran and pngcrush

868 Views Asked by At

I have several hundred images I need to optimise and compress. I have found the following script on github: https://gist.github.com/ryansully/1720244 which works ok. However the filesizes of the jpgs are not much smaller after compression.

For example, one file before compression is 870.24 KB, after it is 724.97 KB. But, if I run the same image through compressjpg.com it reduces the filesize to around 290 KB.

How can I achieve this level of compression with jpegtran? Is it even possible?

0

There are 0 best solutions below