A
A
Anton2018-06-07 09:24:06
Kohana
Anton, 2018-06-07 09:24:06

Photo processing when uploading to the site, optimal compression quality, what percentage?

Hello, please advise the optimal values ​​​​for photo compression, the site is on Kohan, although there is no difference, the whole point when uploading a photo, the handler, or rather the script, processes the photo and cuts it, and I also set it to make the quality worse, something that is imperceptible to eyes, the essence is that it was optimal and the quality did not deteriorate much and the photo weighed less.
What compression percentage is set? 85? or 90? I put 85.
$im->save("$directory/$filename.$ext",85);

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lander, 2018-06-07
Websaytovsky @ws17

Depends on how the photo will be used.
For small previews, I usually set 85-90%
For full-fledged images, if they open exactly at the request of the user - 100%
For backgrounds (background-size: cover), you can use 90%, and if a trendy darkened overlay is superimposed on top of it, then 80% and make the image smaller.
In general - according to the situation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question