diff --git a/codecs/webp_enc/build.sh b/codecs/webp_enc/build.sh
index afba6563..6ab44c03 100755
--- a/codecs/webp_enc/build.sh
+++ b/codecs/webp_enc/build.sh
@@ -14,8 +14,13 @@ echo "============================================="
emcc \
${OPTIMIZE} \
--bind \
+ -D WEBP_USE_THREAD \
-s ALLOW_MEMORY_GROWTH=1 \
- -s MODULARIZE=1 \
+ -s USE_PTHREADS=1 \
+ -s ASSERTIONS=1 \
+ -s PTHREAD_POOL_SIZE=2 \
+ -s TOTAL_MEMORY=268435456 \
+ -s WASM_MEM_MAX=268435456 \
-s 'EXPORT_NAME="webp_enc"' \
--std=c++11 \
-I node_modules/libwebp \
diff --git a/codecs/webp_enc/example.html b/codecs/webp_enc/example.html
index 89cb7825..bf7b61c1 100644
--- a/codecs/webp_enc/example.html
+++ b/codecs/webp_enc/example.html
@@ -1,7 +1,7 @@