From f70276fd5146ac3fa290aa8bd33e0e1697705fe1 Mon Sep 17 00:00:00 2001 From: axlan Date: Fri, 25 Nov 2022 19:11:45 -0800 Subject: [PATCH] Add special case in imageURL for loading local images. --- js/creator-23.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/creator-23.js b/js/creator-23.js index 1a66b0d5..d0fd896d 100644 --- a/js/creator-23.js +++ b/js/creator-23.js @@ -2190,7 +2190,10 @@ function setRoundedCorners(value) { //Various loaders function imageURL(url, destination, otherParams) { var imageurl = url; - if (params.get('noproxy') != '') { + // If an image URL does not have HTTP in it, assume it's a local file at the HTML root directory. + if (!url.includes('http')) { + imageurl = '/' + url; + } else if (params.get('noproxy') != '') { //CORS PROXY LINKS //Previously: https://cors.bridged.cc/ imageurl = 'https://api.codetabs.com/v1/proxy?quest=' + url;