sharp, and why everything uses it
Nearly every Node image pipeline is sharp underneath. It wraps libvips, which is fast and uses far less memory than ImageMagick on large files.
import sharp from "sharp";
await sharp("input.jpg")
.resize({ width: 1600, withoutEnlargement: true })
.webp({ quality: 78 })
.toFile("output.webp");
withoutEnlargement is the option people forget: without it, sharp will happily upscale a small image and produce something soft and larger.