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

This commit is contained in:
David 2023-07-24 01:25:25 -07:00
parent af97dd7484
commit 94cec3c1ee
1 changed files with 7 additions and 1 deletions

View File

@ -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