How to compress image on upload to the server?

The main purpose of reducing the size of images by lowering the resolution / compression.
Tell me how it can be done. Ideally, before uploading to the server, i.e. on the user's computer, if possible.
July 2nd 19 at 17:25
2 answers
July 2nd 19 at 17:27
Dig to the side of the canvas and rendering images in 2d context
July 2nd 19 at 17:29
You can, for example, to use a ready library Imagine, with which to process uploaded image before saving it to disk on the server:
I found the best solution - File API - terry.Ry commented on July 2nd 19 at 17:32

Find more questions by tags PHPJavaScript