Skip to content

Commit a27190d

Browse files
committed
feat: add image_id to button parameters for OBZ image loading
Store image_id in button.parameters to enable web viewers to fetch images via API endpoint instead of embedding large data URLs.
1 parent 4547bae commit a27190d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/processors/obfProcessor.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,14 @@ class ObfProcessor extends BaseProcessor {
232232
}
233233

234234
// Build parameters object for Grid3 export compatibility
235-
const buttonParameters: { imageData?: Buffer; [key: string]: any } = {};
235+
const buttonParameters: { imageData?: Buffer; image_id?: string; [key: string]: any } = {};
236236
if (imageBuffer) {
237237
buttonParameters.imageData = imageBuffer;
238238
}
239+
// Store image_id for web viewers to fetch images via API
240+
if (btn.image_id) {
241+
buttonParameters.image_id = btn.image_id;
242+
}
239243

240244
return new AACButton({
241245
// Make button ID unique by combining page ID and button ID

0 commit comments

Comments
 (0)