From 94cec3c1eed368d039aa5854213d825e7a184a82 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 24 Jul 2023 01:25:25 -0700 Subject: [PATCH] Allow webp/apng detection to work if media proxy is off and domain is the same --- src/components/still-image/still-image.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/still-image/still-image.js b/src/components/still-image/still-image.js index 81da126a..f63b258b 100644 --- a/src/components/still-image/still-image.js +++ b/src/components/still-image/still-image.js @@ -44,7 +44,13 @@ const StillImage = { return } // harmless CORS errors without-- clean console with - if (!this.$store.state.instance.mediaProxyAvailable) return + if ( + !this.$store.state.instance.mediaProxyAvailable + // same domain can continue + && !image.src.startsWith(window.location.origin) + ) { + return + } // Animated JPEGs? if (!(this.src.endsWith('.webp') || this.src.endsWith('.png'))) return // Browser Cache should ensure image doesn't get loaded twice if cache exists -- 2.43.0