I want to compress image before uploading it to PHP Server using vanilla javascript. I currently use PHP Compression however I was wondering whether it can be compressed in clients side browser so that it might save time uploading the images. I will be using fetch API to interact with the server.
I have read the following answers in stack overflow.
Compressing an image before sending it to the Server How to compress image size in JavaScript?
Also I want to make it using Vanilla Javascript and does not want to depend upon libraries.