ImageMagick is a full featured, powerful, scriptable image manipulation tool that has stood the test of time. I usually use it within #Ruby scripts, and mainly for resizing images. You can also add effects and composite images. It has advanced options for everything so you can get just the results you want. It's almost like a programmable #Photoshop.
As an alternative, a modern #JavaScript image resizer is now available, #sharp, if you want to stick within a #JavaScript script ecosystem: https://sharp.pixelplumbing.com.