I need to optimize some images, but not change their name.
jpegtran -copy none -optimize image.jpg > image.jpg
However, this seems to crea
Another option if -outfile is not supported:
-outfile
jpegtran -copy none -optimize image.jpg | sponge image.jpg
sponge is part of moreutils.
sponge