Is your feature request related to a problem? Please describe.
I'd like to be able to optimise existing JPGs without re-encoding them and losing quality.
Describe the solution you'd like
jpegtran is a popular program to optimise JPGs. It's a part of libjpeg-turbo, so it's also available under mozjpeg. mozjpeg is already used in @jsquash/jpeg. So adding an optimise function export would make sense, similar to @jsquash/oxipng.
https://github.com/mozilla/mozjpeg/blob/master/jpegtran.c
jpegtran has a bunch of options, I typically use -optimize -copy none -progressive.
https://github.com/mozilla/mozjpeg/blob/master/jpegtran.1
Describe alternatives you've considered
jSquash is the only actively maintained library I've found that provides oxipng WASM builds with web browser support. It'd be perfect if it also provided a way to optimise JPGs. As far as I can tell, there's no actively maintained package for jpegtran WASM builds or any other package that can optimise JPGs like it can.
Additional context
n/a
Is your feature request related to a problem? Please describe.
I'd like to be able to optimise existing JPGs without re-encoding them and losing quality.
Describe the solution you'd like
jpegtran is a popular program to optimise JPGs. It's a part of libjpeg-turbo, so it's also available under mozjpeg. mozjpeg is already used in
@jsquash/jpeg. So adding anoptimisefunction export would make sense, similar to@jsquash/oxipng.https://github.com/mozilla/mozjpeg/blob/master/jpegtran.c
jpegtran has a bunch of options, I typically use
-optimize -copy none -progressive.https://github.com/mozilla/mozjpeg/blob/master/jpegtran.1
Describe alternatives you've considered
jSquash is the only actively maintained library I've found that provides oxipng WASM builds with web browser support. It'd be perfect if it also provided a way to optimise JPGs. As far as I can tell, there's no actively maintained package for jpegtran WASM builds or any other package that can optimise JPGs like it can.
Additional context
n/a