I need image compressor in js?

I need a frontend image compressor in js, Where users can choose their image adjust the compression size, and click on the compress button. The image will compress and show with a download button and image size.