Image-conversion is the library I've used the most, since you can target file-size || quality:
https://github.com/WangYuLue/image-conversion