Allow webp/apng detection to work if media proxy is off and domain is the same #328

Closed
Mergan wants to merge 1 commit from Mergan/pleroma-fe:still-image-allow-same-host into develop

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