I would like to create a PHP script for optimizing images, similar to how PunyPNG or Kraken.io optimizes images. In fact, I would need to take .jpeg, .png and .gif images and minimize their file size without losing quality (or with minimal loss of quality).
These services offer an API, but I would like to avoid unnecessary costs, and I do not want to be limited to a certain number of daily applications.
Can this be done with ImageMagick? Is it possible, or is it too complicated?
source share