public static boolean isAnimatedWebpHeader(final byte[] imageHeaderBytes, final int offset) {
    boolean isVp8x = matchBytePattern(imageHeaderBytes, offset + 12, WEBP_VP8X_BYTES);
    // ANIM is 2nd bit (00000010 == 2) on 21st byte (imageHeaderBytes[20])
    boolean hasAnimationBit = (imageHeaderBytes[offset + 20] & 2) == 2;
    return isVp8x && hasAnimationBit;
  }
Checks whether underlying platform supports extended WebPs
fbcore/src/main/java/com/facebook/common/webp/WebpSupportStatus.java