dracula sorsi
dracula sorsi

Reputation: 13

Reducing filesize of a jpg image by reducing its quality

Is there any way in PHP to reduce quality of a JPG image in order to reduce its file size instead of resizing its dimensions?

Upvotes: 0

Views: 81

Answers (1)

Lajos Veres
Lajos Veres

Reputation: 13725

Check this function's third argument:

http://php.net/imagejpeg

quality

quality is optional, and ranges from 0 (worst quality, smaller file) to 100 (best quality, biggest file). The default is the default IJG quality value (about 75).

Upvotes: 2

Related Questions