Linux batch conversion: Change quality of jpg with convert but keep its name

Frank Vilea picture Frank Vilea · Mar 29, 2012 · Viewed 41k times · Source

If I convert my images with

convert -quality 80% *.jpg

It works, but the software changes the file names to the first one it picks. How can I keep the name or even replace the previous image with that of a lower quality.

Answer

Zsolt Botykai picture Zsolt Botykai · Mar 29, 2012

Try this instead:

mogrify -quality 80% *.jpg