Skip to content

Are animated images like webp or gif supported on Android? #100

Description

@adammruk

Hi team! I'm trying to integrate Nitro Image into our app but I ran into some issues. To narrow it down, I created simple Expo App and installed nitro image there. While ios is working fine, on Android I'm hitting error Requested Image is not a Bitmap! when trying to load remote animated gif. I got the same issue with animated webp.

To reproduce I just did in my component:

 const gifImage = useImage({
    url: "https://www.easygifanimator.net/images/samples/imageeffects.gif",
  });
. . .
{gifImage.image && (
        <NitroImage
          image={gifImage.image}
          style={{ width: 200, height: 200 }}
        />
      )}

Is this something on my side? I understand that Coil should support animated image: https://coil-kt.github.io/coil/gifs/ if AnimatedImageDecoder is loaded. The error I'm getting is throw from here: https://github.com/mrousavy/react-native-nitro-image/blob/main/packages/react-native-nitro-web-image/android/src/main/java/com/margelo/nitro/web/image/ImageLoader%2BloadImageAsync.kt#L34
Is react-native-nitro-web-image preventing animated images?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions