Optimal PNG or JPEG image compression quality / low file size - PHP

What is an optimal PNG or JPEG image compression quality when using PHP imagepng() or imagejpeg() ? I need to get a good image quality, but also a low file size.
16 May 2022 at 06:48 PM
0give a positive ratinggive a negative ratingshow more
LarsLars
Hi,

Good quality for image compession is:
  • PNG - around 5
  • JPEG - around 75


These compressions levels should provide a good image quality and relatively low file size. I recommend to use at least some conversion to get images with low file size. Images with no compression have often large file size.
19 May 2022 at 11:57 AM
0give a positive ratinggive a negative ratingshow more
TimTim
Share on FacebookShare on TwitterShare on LinkedInSend email
Follow us on Facebook
2022 AnswerTabsTermsContact us