PHP compress image with Lossy / Lossless

How can I, using PHP, compress an image using Lossy / Lossless compression the same way these two sites compress them:

https://compressor.io/ and https://kraken.io/web-interface

Thank!

+3


source to share


2 answers


These sites do not compress images with PHP and you cannot get a similar result with PHP . They use various compression tools or plugins written specifically for compressing images.

To compress PNG , pngquant is the best solution , but you must install on your server to use it with PHP .



Also, here is a list of tools you can check out about compressing different types of images.

+5


source


Yes you can with this PHP API: PHP API for Images



It is a suite of image management tools that include loss optimization.

0


source







All Articles