One catch with the restore step: browsers now apply EXIF orientation when decoding into a canvas, so the re-encoded pixels are often already upright. If you then copy -all:all back from the original, Orientation=6 comes along and viewers rotate the image a second time. Resetting it after the copy (exiftool -Orientation=1 -n compressed.jpg) avoids that. Does your compressor normalise orientation before it writes the EXIF block back?