Detect Animation only for mediaProxy
ci/woodpecker/pr/woodpecker Pipeline was successful Details

Works without, but this should suppress CORS browser errors
This commit is contained in:
David 2022-09-09 04:24:46 -07:00
parent 9f65fef4d5
commit 9d3a32a636
1 changed files with 2 additions and 1 deletions

View File

@ -43,11 +43,12 @@ const StillImage = {
this.isAnimated = true
return
}
// harmless CORS errors without-- clean console with
if (!this.$store.state.instance.mediaProxyAvailable) 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
fetch(image.src, {
mode: 'cors',
referrerPolicy: 'same-origin'
})
.then(data => {