mirror of
https://akkoma.dev/AkkomaGang/akkoma-fe
synced 2025-04-30 19:19:29 +08:00
Detect Animation only for mediaProxy
Works without, but this should suppress CORS browser errors
This commit is contained in:
parent
9f65fef4d5
commit
9d3a32a636
1 changed files with 2 additions and 1 deletions
|
@ -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 => {
|
||||
|
|
Loading…
Reference in a new issue