I have a 500 kb image and I wanna compress it using PHP GD or Imagick library. But I didn't found any function or method to compress the image to the desired size (150 KB). The function should try to compress the size to 150 kB or nearest.
Is there any function in PHP to compress image to desired size(in KB) or to the nearest size defined
Asked
Active
Viewed 62 times
0
-
https://stackoverflow.com/a/56362422/231316 – Chris Haas Jun 30 '21 at 03:32
-
Does this answer your question? [PHP - Compress Image to Meet File Size Limit](https://stackoverflow.com/questions/24872013/php-compress-image-to-meet-file-size-limit) – morric Jun 30 '21 at 06:01
-
Yes. But I was looking for something else. – shank sharma Jul 02 '21 at 02:15