From ba61af49e0b8c2ee4e74b9b7f028a75814830272 Mon Sep 17 00:00:00 2001 From: matdave Date: Tue, 24 Oct 2023 11:40:03 -0500 Subject: [PATCH] add a trim statement to the URL to help with external image sources --- source/js/mgr/imageplus.panel.input.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/js/mgr/imageplus.panel.input.js b/source/js/mgr/imageplus.panel.input.js index 50e055b..30e3588 100644 --- a/source/js/mgr/imageplus.panel.input.js +++ b/source/js/mgr/imageplus.panel.input.js @@ -359,7 +359,8 @@ Ext.extend(ImagePlus.panel.input, MODx.Panel, { return false; } })(this); - img.src = baseUrl + this.image.sourceImg.src; + srcTrim = this.image.sourceImg.src.replace(new RegExp('^(' + baseUrl + ')+'), ''); + img.src = baseUrl + srcTrim; }, // Update the component display on state change updateDisplay: function () {