I do a lot of web pages and web sites that have a lot of photos. In fact, I'm working on one now and it's been a major source of web page block.
So I'm going to create a process that automats as much of it as possible and document it for the next time(s).
First, upgrade node and npm to the latest versions.
To upgrade, run:
npm install npm@latest -g
nvm install node --reinstall-packages-from=node
I have image magic installed on my computer. The command is magick and it is well documented at https://www.imagemagick.org/script/command-line-processing.php
While Grunt is a nice way to do this, it's not necessary, because I just have to do it once. I'm usually not wanting to use grunt or another tool.