Select Page

Batch converting images in command line

by | 1 August 2018 | Linux | 0 comments

Today I wanted to resize some pictures. I always use command line and “convert” to do it. Usually I type this:

convert pix1.jpg -resize 1024 resized_pix1.jpg


This command resizes me picture to 1024 pixels in width.


Today I wanted do the same but I had more pictures. So if you would like to do batch convert type this in terminal:

for i in *.jpg; do convert "$i" -resize 1024 converted_"$i"; done



Follow us