From 3b6139ed234a118a45e17adcc6e46c15965f88ac Mon Sep 17 00:00:00 2001 From: Jonathan Durand <38976316+jdugh@users.noreply.github.com> Date: Fri, 16 Jan 2026 20:14:56 +0100 Subject: [PATCH] Revert dynamic file extension detection to hardcoded 'jpg' (#218) --- src/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index b55704a..d8c33d6 100755 --- a/src/index.js +++ b/src/index.js @@ -1454,7 +1454,12 @@ class Workbook { } this.initRichData(); const maxFildId = this.findMaxFileId(/xl\/media\/image\d*\..*/, /image(\d*)\./); - const fileExtension = substitution.split('.').pop(); + /** + * Setting extension back to "jpg" which works for all image formats + * for now. Proper extension detection will be addressed in a future PR + * with appropriate testing. + */ + const fileExtension = "jpg"; try { substitution = this.imageToBuffer(substitution); }