Skip to content

Batch resize images

Shell
4 mo. ago

Batch resize and center images to a specific dimension.

batch
image
imagemagick
magick
batch-resize-images-command.sh
# cd to directory with images
# adjust size as necessary 1427x803 (resize, extent)
# change output directory: ~/Downloads/output/"$file"
for file in *.jpg; do
magick "$file" -gravity center -resize '1427x803^' -extent 1427x803 ~/Downloads/output/"$file"
done