Converting Multiple Images Using ImageMagick in Zsh

convert is a useful tool which can be used to convert numerous files from .JPG to .png. Converting all files in a directory and subdirectories can be done using a for loop:

1
for i in **/*.JPG; convert $i $i:r.png

Resizing can be done at the same time. A % can be used (as well as various geometries):

1
for i in *.JPG; convert -resize 10% $i $i:r.png