Skip to content

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

Open

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

  1. mrousavy commented on Mar 11, 2026

    @mrousavy
    Owner

    Hmm, I think it might be because we cast to Bitmap. I'll look into this

  2. mrousavy commented on Mar 15, 2026

    @mrousavy
    Owner

    They should be supported via the web-image loader - can you try to use useImageLoader or basically just passing { url: ... } directly, insetead of using useImage(...)?

  3. SMhdAsadi commented on Apr 15, 2026

    @SMhdAsadi

    I had several animated images in AVIF format. Tried to load them with require in useImageLoader but only the first frame is shown.

  4. DaveyEke commented on Apr 27, 2026

    @DaveyEke

    Hello @adammruk, by default nitro-image doesn't support loading animated images such as .gif for now. I have an open PR which adds support for this and other animated image extensions via a separate package. Feel free to try our the PR locally.

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