to batch resize images ...
sudo apt install imagemagick
then run ...
for file in *.jpg; do convert $file -resize 1280 $file; done
this will destructively resize all the jpgs in the current directory to 1280 pixel wide, maintaining the aspect ratio.