Quick tip if you need to batch resize a number of photos from the command line:

Step #1: Install ImageMagick

Step #2: Run the following script, replacing the brackets with the actual paths. This will resize to 1024px wide and auto-resize the height in ratio.

mogrify -resize 1024 -quality 100 -path [full path to new file folder] [path to photos to resize]    

Here is an example of the full script:

mogrify -resize 1024 -quality 100 -path /home/user/resized /home/user/original/*.jpg