1. Open the terminal and “cd” to the folder that contain all the images that you want to resize. Alternatively, you can open the Finder and drag the folder to the terminal to paste the file path.
  2. Type this command:

and all the jpg files in the folder will be resized to 320px wide. You can change the width or the file format. That’s it.