Allow sending and thumbnailing AVIF images (#8172)

This commit is contained in:
Michael Telatynski 2022-03-29 07:03:41 +01:00 committed by GitHub
parent 4e665dedb9
commit cd15e08fc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 10 deletions

View file

@ -17,7 +17,8 @@
import { arrayHasDiff } from "./arrays";
export function mayBeAnimated(mimeType: string): boolean {
return ["image/gif", "image/webp", "image/png", "image/apng"].includes(mimeType);
// AVIF animation support at the time of writing is only available in Chrome hence not having `blobIsAnimated` check
return ["image/gif", "image/webp", "image/png", "image/apng", "image/avif"].includes(mimeType);
}
function arrayBufferRead(arr: ArrayBuffer, start: number, len: number): Uint8Array {