From ae481273ce1830c8eb1edd4d150f612bddc3134a Mon Sep 17 00:00:00 2001 From: Brent Ely Date: Sun, 24 Jul 2022 15:07:48 -0500 Subject: [PATCH] fixed Issue #860 --- src/gen-objects.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gen-objects.ts b/src/gen-objects.ts index d450eefdc..96499c2a8 100644 --- a/src/gen-objects.ts +++ b/src/gen-objects.ts @@ -413,13 +413,14 @@ export function addImageDefinition(target: PresSlide, opt: ImageProps) { // STEP 1: Set extension // NOTE: Split to address URLs with params (eg: `path/brent.jpg?someParam=true`) - let strImgExtn = + let strImgExtn = ( strImagePath .substring(strImagePath.lastIndexOf('/') + 1) .split('?')[0] .split('.') .pop() .split('#')[0] || 'png' + ).toLowerCase() // However, pre-encoded images can be whatever mime-type they want (and good for them!) if (strImageData && /image\/(\w+);/.exec(strImageData) && /image\/(\w+);/.exec(strImageData).length > 0) {