I wanted to shrink pictures a folder with thousands of files. They were unnecessarily huge. So I made a script to resize them.
mogrify takes all the RAM it can in the system to handle huge files, making the system unusable. Luckily it has a
-limit option so it behaves. Use it like this
mogrify -limit memory 32 -limit map 32 -thumbnail 12801280 -quality 70 filename.ext