I have a folder full of name*.jpg files.

I found that Imagemagick convert is the right 'tool' to resize my images.

The command I'm using is

convert name*.jpg -resize 2000x1500 name*.jpg

Problem is, that it uses all my RAM (8 GB) so my PC hangs and after a while it starts doing something but the output files are not resized.

Does anyone know what the issue could be?
Size of all files is about 200 MB.

  • also tried other output names. Same result :/ – OcK May 21 '17 at 10:52
  • so about the size problem if I use , with the exclamation mark after the size it works: convert name*.jpg -resize 2000x1500! name*.jpg – OcK May 21 '17 at 10:54
  • convert does not accept multiple files as input or output. Also, if you want to overwrite orginal files use mogrify instead of convert. – pLumo Aug 20 '19 at 13:37
  • 1
    @OcK More than one package can install a convert command in /usr/bin. You may be able to get more answers and/or an explanation of what happened if you edit this question to include the output of lsb_release -a, type -a convert, apt list --installed '*magick*', and namei /usr/bin/convert. – Eliah Kagan Aug 21 '19 at 4:39

Instead of:

convert name*.jpg -resize 2000x1500 new_name*.jpg

The following worked for me: (loop on every jpg image in the given folder):

for file in *.jpg
    convert "$file" -resize 2000x1500 "new-$file"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.