├── ~/ │ ├── content/ │ │ ├── image01.jpg │ │ ├── image02.png │ │ ├── image03.bmp │ │ ├── text-file.txt │ │ ├── video.mp4 │ └── ... └── ...
Let's say I want to compress all images in my
content/ directory utilizing ImageMagick's standard
-quality argument, with defualt settings. To overwrite and replace the files in their folder (caution!) it seems I would use the mogrify command:
~/content$ mogrify -quality *
but this just yields the following error:
What's the correct mogrify command? And what will happen to the non-image files (eg
video.mp4)? Perhaps I should request the individual
mogrify commands for individual image types (eg jpg, png, bmp, etc.). Or is there a better strategy for salvaging non-image files?
-qualityoption needs a value argument ex.
mogrify -quality 75 *(without it, the first filename in the expansion of
*will be read as a - likely invalid - quality value)