Allow webp/apng detection to work if media proxy is off and domain is the same
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful

This commit is contained in:
David 2023-07-24 01:25:25 -07:00
parent af97dd7484
commit 94cec3c1ee

View file

@ -44,7 +44,13 @@ const StillImage = {
return return
} }
// harmless CORS errors without-- clean console with // 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? // Animated JPEGs?
if (!(this.src.endsWith('.webp') || this.src.endsWith('.png'))) return if (!(this.src.endsWith('.webp') || this.src.endsWith('.png'))) return
// Browser Cache should ensure image doesn't get loaded twice if cache exists // Browser Cache should ensure image doesn't get loaded twice if cache exists