forked from AkkomaGang/akkoma-fe
Allow webp/apng detection to work if media proxy is off and domain is the same
This commit is contained in:
parent
af97dd7484
commit
94cec3c1ee
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue