Convert png/jpg/webp images on MacOS using ImageMagick
By Steve Claridge on 2023-01-11.
Installing ImageMagick
ImageMagick is a command-line tool and is the swiss army knife of image manipulation. It does everything.
To install ImageMagick on MacOS, open a Terminal window and
brew install imagemagick
Once the install has finished close the terminal window. If you don't then when you type the ImageMagick command below, it won't be found.
Convert an image to another format using ImageMagick
You can get some help to see all of the stuff that ImageMagick can do
convert --help | more
But converting from one image format is dead simple as ImageMagick will check the input and output filename extension that you specify and convert accordingly, so to convert from a JPEG to WEBP
convert inputfile.jpg outputfile.webp
Just change the filename to convert to a different format
convert inputfile.jpg outputfile.png