Apparently jpegoptim writes its output to a temporary file and uses
rename(2) to move it back to the original. This breaks hard- and
symlinks and changes the permissions of the file.
File permissions are now preserved. And symbolic links (and other special files) are skipped to avoid "breaking" symlinks.
Behavior with hard-linked files is now documented on the man page.
Apparently jpegoptim writes its output to a temporary file and uses rename(2) to move it back to the original. This breaks hard- and symlinks and changes the permissions of the file.
ref: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=708630