feat: better image handling (auto resize & max size constraints) (#26401)

This commit is contained in:
Aiden Cline
2026-05-10 01:48:19 -05:00
committed by GitHub
parent 5217e6c1af
commit 85ce6a5f95
18 changed files with 417 additions and 34 deletions
@@ -0,0 +1,14 @@
diff --git a/photon_rs.js b/photon_rs.js
index 8f4144d..b83e9a9 100644
--- a/photon_rs.js
+++ b/photon_rs.js
@@ -4509,7 +4509,8 @@ module.exports.__wbindgen_init_externref_table = function() {
;
};
-const path = require('path').join(__dirname, 'photon_rs_bg.wasm');
+// Allow opencode's Bun compiled binary to point photon-node at its embedded wasm asset.
+const path = globalThis.__OPENCODE_PHOTON_WASM_PATH || require('path').join(__dirname, 'photon_rs_bg.wasm');
const bytes = require('fs').readFileSync(path);
const wasmModule = new WebAssembly.Module(bytes);