Skip to content

Make images smaller using best-in-class codecs, right in the browser.

JavaScript

Make MozJPEG builds reproducible

Ingvar Stepanyan7ce0c8a4fcf3
diff --git a/codecs/mozjpeg/Makefile b/codecs/mozjpeg/Makefile
index 65179d79..bbdd7ade 100644
--- a/codecs/mozjpeg/Makefile
+++ b/codecs/mozjpeg/Makefile
@@ -46,7 +46,10 @@ $(CODEC_DIR)/Makefile: $(CODEC_DIR)/configure
--without-turbojpeg \
--without-simd \
--without-arith-enc \
- --without-arith-dec
+ --without-arith-dec \
+ --with-build-date=squoosh
+ # ^ If not provided with a dummy value, MozJPEG includes a build date in the
+ # binary as part of the version string, making binaries different each time.
$(CODEC_DIR)/configure: $(CODEC_DIR)/configure.ac
cd $(CODEC_DIR) && autoreconf -iv
diff --git a/codecs/mozjpeg/enc/mozjpeg_enc.wasm b/codecs/mozjpeg/enc/mozjpeg_enc.wasm
index e2f0ea74..6dc8b5b6 100755
Binary files a/codecs/mozjpeg/enc/mozjpeg_enc.wasm and b/codecs/mozjpeg/enc/mozjpeg_enc.wasm differ
diff --git a/codecs/mozjpeg/enc/mozjpeg_node_enc.wasm b/codecs/mozjpeg/enc/mozjpeg_node_enc.wasm
index e2f0ea74..6dc8b5b6 100755
Binary files a/codecs/mozjpeg/enc/mozjpeg_node_enc.wasm and b/codecs/mozjpeg/enc/mozjpeg_node_enc.wasm differ